fixes #1306
This commit is contained in:
@@ -14,6 +14,7 @@ class Post < ActiveRecord::Base
|
||||
before_save :create_tags
|
||||
before_save :update_tag_post_counts
|
||||
before_save :set_tag_counts
|
||||
before_save :strip_source
|
||||
before_validation :initialize_uploader, :on => :create
|
||||
before_validation :parse_pixiv_id
|
||||
before_validation :blank_out_nonexistent_parents
|
||||
@@ -1136,6 +1137,10 @@ class Post < ActiveRecord::Base
|
||||
@typed_tags = nil
|
||||
self
|
||||
end
|
||||
|
||||
def strip_source
|
||||
self.source = source.strip
|
||||
end
|
||||
end
|
||||
|
||||
Post.connection.extend(PostgresExtensions)
|
||||
|
||||
Reference in New Issue
Block a user