Extract rendering to helper method. Shift filename sanitization to controller.

This commit is contained in:
Jan-Yves Ruzicka 2015-04-03 12:13:21 +01:00
parent 7801364662
commit ccf13418f4
12 changed files with 105 additions and 78 deletions

View file

@ -0,0 +1,15 @@
class RemoveRenderedNotes < ActiveRecord::Migration
def self.up
remove_column :todos, 'rendered_notes'
end
def self.down
add_column :todos, 'rendered_notes', :text
# Call save on each todo to force generation of rendered_notes
# Copied from 20120412072508_add_rendered_notes
say "Rendering todo notes..."
Todo.all.each{ |todo| todo.save(validate: false) }
say "Finished rendering todo notes."
end
end