Skip to content

Commit

Permalink
Merge pull request #346 from cwoodcox/rails-4/attr_accessible
Browse files Browse the repository at this point in the history
only use attr_accessible if it's supported
  • Loading branch information
tilsammans committed Apr 20, 2013
2 parents 2fda8f1 + cda027d commit 5e72269
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/acts_as_taggable_on/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module ActsAsTaggableOn
class Tag < ::ActiveRecord::Base
include ActsAsTaggableOn::Utils

attr_accessible :name
attr_accessible :name if defined?(ActiveModel::MassAssignmentSecurity)

### ASSOCIATIONS:

Expand Down
4 changes: 2 additions & 2 deletions lib/acts_as_taggable_on/tagging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Tagging < ::ActiveRecord::Base #:nodoc:
:taggable_id,
:tagger,
:tagger_type,
:tagger_id
:tagger_id if defined?(ActiveModel::MassAssignmentSecurity)

belongs_to :tag, :class_name => 'ActsAsTaggableOn::Tag'
belongs_to :taggable, :polymorphic => true
Expand All @@ -31,4 +31,4 @@ def remove_unused_tags
end
end
end
end
end

0 comments on commit 5e72269

Please sign in to comment.