lib/rails-canhaz/canhaz_permission.rb in rails-canhaz-2.0.1 vs lib/rails-canhaz/canhaz_permission.rb in rails-canhaz-2.0.2
- old
+ new
@@ -1,10 +1,10 @@
require 'active_record'
class CanHazPermission < ActiveRecord::Base
# Only call attr_accessible for Rails 3.x
- if ActiveRecord::VERSION::MAJOR == '3'
+ if ActiveRecord::VERSION::MAJOR == 3
attr_accessible :csubject_id, :csubject_type, :cobject_type, :cobject_id, :permission_name
end
validates :cobject_id, :uniqueness => {:scope => [:permission_name, :csubject_id, :csubject_type, :cobject_type]}