move mapping of form attributes to model attributes from pattern to builder to make

pattern independent of form
This commit is contained in:
Reinier Balt 2014-02-07 22:55:52 +01:00
parent 1f36c27af8
commit 776a046465
22 changed files with 463 additions and 446 deletions

View file

@ -77,13 +77,10 @@ class RecurringTodosController < ApplicationController
end
def destroy
@number_of_todos = @recurring_todo.todos.count
# remove all references to this recurring todo
@todos = @recurring_todo.todos
@number_of_todos = @todos.size
@todos.each do |t|
t.recurring_todo_id = nil
t.save
end
@recurring_todo.clear_todos_association
# delete the recurring todo
@saved = @recurring_todo.destroy
@ -100,7 +97,7 @@ class RecurringTodosController < ApplicationController
else
notify :error, t('todos.error_deleting_recurring', :description => @recurring_todo.description)
end
redirect_to :action => 'index'
redirect_to :action => 'index'
end
format.js do