Displaying 1 result from an estimated 1 matches for "add_recipe".
Did you mean:
add_receipt
2012 Apr 02
0
active admin saving selection from collection_select and passing to controller
..."
controller do
def new
new! do |format|
@menu_recipe = MenuRecipe.new
end
end
def create
create! do |format|
recipe = Recipe.find(params[:recipe_id])
menu = Menu.find(params[:menu_id])
@menu_recipe = @menu.add_recipe(menu.id)
if @menu_recipe.save
redirect_to {admin_menu_recipe_url}
end
end
end
end
end
i cant seems to get the current menu and recipe that i group
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribe...