mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-06 12:50:19 +01:00
Extract rendering to helper method. Shift filename sanitization to controller.
This commit is contained in:
parent
7801364662
commit
ccf13418f4
12 changed files with 105 additions and 78 deletions
15
db/migrate/20150413194512_remove_rendered_notes.rb
Normal file
15
db/migrate/20150413194512_remove_rendered_notes.rb
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue