Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Only use attr_accessible for Rails 3
Browse files Browse the repository at this point in the history
  • Loading branch information
laserlemon committed Jan 21, 2014
1 parent f1c70a7 commit 966d96d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/vestal_versions/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ class Version < ActiveRecord::Base

# Associate polymorphically with the parent record.
belongs_to :versioned, :polymorphic => true
attr_accessible :modifications, :number, :user, :tag, :reverted_from

if ActiveRecord::VERSION::MAJOR == 3
attr_accessible :modifications, :number, :user, :tag, :reverted_from
end

# ActiveRecord::Base#changes is an existing method, so before serializing the +changes+ column,
# the existing +changes+ method is undefined. The overridden +changes+ method pertained to
Expand Down

0 comments on commit 966d96d

Please sign in to comment.