lib/osm/api_access.rb in osm-1.2.5 vs lib/osm/api_access.rb in osm-1.2.6
- old
+ new
@@ -11,10 +11,12 @@
attribute :id, :type => Integer
attribute :name, :type => String
attribute :permissions, :default => {}
- attr_accessible :id, :name, :permissions
+ if ActiveModel::VERSION::MAJOR < 4
+ attr_accessible :id, :name, :permissions
+ end
validates_numericality_of :id, :only_integer=>true, :greater_than=>0
validates_presence_of :name
validates :permissions, :hash => {:key_type => Symbol, :value_type => Array}