Skip to content

Commit

Permalink
Removing internal uses of deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
beerlington committed Jul 23, 2012
1 parent d3174f6 commit 1c99712
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/classy_enum/attributes.rb
Expand Up @@ -44,7 +44,7 @@ def classy_enum_attr(*args)
# Add ActiveRecord validation to ensure it won't be saved unless it's an option
validates_inclusion_of attribute,
:in => valid_attributes,
:message => "must be one of #{klass.valid_options}",
:message => "must be one of #{klass.all.join(', ')}",
:allow_blank => allow_blank,
:allow_nil => allow_nil

Expand Down
2 changes: 1 addition & 1 deletion lib/classy_enum/class_methods.rb
Expand Up @@ -71,7 +71,7 @@ def inherited(klass)
# Priority.build(:low) # => PriorityLow.new
def build(value, options={})
return value if value.blank?
return TypeError.new("Valid #{self} options are #{self.valid_options}") unless self.enum_options.include? value.to_sym
return TypeError.new("Valid #{self} options are #{self.all.join(', ')}") unless self.enum_options.include? value.to_sym

# Temp hack until 3.0 to allow both namespaced and non-namespaced classes
begin
Expand Down

0 comments on commit 1c99712

Please sign in to comment.