Your Account
Hear us Roar
def create
@recipe = Recipe.new(@params['recipe'])
@recipe.date = Date.today
if @recipe.save
redirect_to :action => 'list'
else
render_action 'new'
end
end
I get this error when I go to url.../new
" SyntaxError in <controller not set>#<action not set>"
"app/controllers/recipe_controller.rb:19: formal argument cannot be an instance variable"
This error occures on all the pages; list, edit, ect. If I remove the create method then the error goes away.
Showing messages 1 through 4 of 4.
© 2014, O’Reilly Media, Inc.
(707) 827-7019
(800) 889-8969
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.