fixes #2010
This commit is contained in:
@@ -11,6 +11,7 @@ class Pool < ActiveRecord::Base
|
|||||||
before_validation :normalize_name
|
before_validation :normalize_name
|
||||||
before_validation :initialize_is_active, :on => :create
|
before_validation :initialize_is_active, :on => :create
|
||||||
before_validation :initialize_creator, :on => :create
|
before_validation :initialize_creator, :on => :create
|
||||||
|
before_validation :strip_name
|
||||||
after_save :create_version
|
after_save :create_version
|
||||||
after_create :synchronize!
|
after_create :synchronize!
|
||||||
before_destroy :create_mod_action_for_destroy
|
before_destroy :create_mod_action_for_destroy
|
||||||
@@ -339,6 +340,10 @@ class Pool < ActiveRecord::Base
|
|||||||
super(options, &block)
|
super(options, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def strip_name
|
||||||
|
self.name = name.to_s.strip
|
||||||
|
end
|
||||||
|
|
||||||
def serializable_hash(options = {})
|
def serializable_hash(options = {})
|
||||||
return {
|
return {
|
||||||
"category" => category,
|
"category" => category,
|
||||||
|
|||||||
Reference in New Issue
Block a user