Skip to content

Commit

Permalink
fixed a ActiveRecord::ReadOnlyRecord error occuring during the migrat…
Browse files Browse the repository at this point in the history
…ion when rails 3.2 is used and there's existing data in the db.
  • Loading branch information
dmitri-d committed Apr 3, 2013
1 parent ba0eb5b commit 982c4dc
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -8,7 +8,7 @@ def self.up
(org.environments + [org.library]).each do |env|
old_view = ContentView.where(:environment_default_id=>env.id).first
cve = old_view.content_view_environments.first
version = old_view.version(env)
version = ContentViewVersion.find(old_view.version(env))

version.content_view = default_view
version.save!
Expand Down

0 comments on commit 982c4dc

Please sign in to comment.