Skip to content

Commit

Permalink
Remove params[:task] from new action. tasks/new accepted only via GET…
Browse files Browse the repository at this point in the history
… withou any params. I think this code was copy-pasted from another action.
  • Loading branch information
Anatoliy Lysenko committed Mar 8, 2010
1 parent eb59865 commit a4e15f4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/controllers/tasks_controller.rb
Expand Up @@ -16,10 +16,7 @@ def new
redirect_to :controller => 'projects', :action => 'new'
return
end
#FIXME: Task.new instead of Task.new(params[:task])
# action new must be accepted only via get, so params[:task] not exist
# params[:task] exist in create and update actions
@task = Task.new(params[:task])
@task = Task.new
@task.company = current_user.company
@task.duration = 0
@task.users << current_user
Expand Down

0 comments on commit a4e15f4

Please sign in to comment.