Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleaning up classy_enum_attr args

  • Loading branch information...
commit b7b9ed1e9da459d6a945613af81888f16bc6d096 1 parent ee548f2
@beerlington beerlington authored
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/classy_enum/active_record.rb
View
6 lib/classy_enum/active_record.rb
@@ -21,11 +21,7 @@ module ActiveRecord
#
# # Allow enum value to be blank
# classy_enum_attr :priority, :allow_blank => true
- def classy_enum_attr(*args)
- options = args.extract_options!
-
- attribute = args[0]
-
+ def classy_enum_attr(attribute, options={})
enum = (options[:enum] || attribute).to_s.camelize.constantize
allow_blank = options[:allow_blank] || false
allow_nil = options[:allow_nil] || false
Please sign in to comment.
Something went wrong with that request. Please try again.