If I change the path to tasks_path, I get the following error while navigating on to the page which has this form. If I keep task_path, navigation works fine.
I don't see any error in development.log when I click on the Add button. the page re-loads as expected because of "task_path" url but data doesn't persist.
Started POST "/task" for 127.0.0.1 at 2013-11-30 15:11:15 +0530
Processing by HomeLoginController#task as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"wXpiPiPabBjOBN1iqF/Hj4z81y3RCcSj/gRSpWFuIC0=", "task"=>{"name"=>"eeff"}, "commit"=>"Add"}
^[[1m^[[36mUser Load (0.2ms)^[[0m ^[[1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1^[[0m
^[[1m^[[35mTask Load (0.2ms)^[[0m SELECT "tasks".* FROM "tasks"
Rendered home_login/_job_form.html.erb (1.2ms)
Rendered home_login/task.html.erb within layouts/application (67.2ms)
Completed 200 OK in 97.6ms (Views: 93.5ms | ActiveRecord: 0.4ms)
Also, I missed adding create action in controller earlier, have added it now:
def create
Task.create params[:task]
redirect_to :back
end