Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## error
- You have a nil object when you didn't expect it!
- The error occurred while evaluating nil.name
- ## view
- <h1><%= @store.name %></h1>
- ## edit action
- def edit
- @store = Store.find(params[:store_id])
- @store_daily_financial = StoreDailyFinancial.find(params[:id])
- end
- ## update action
- def update
- @store_daily_financial = StoreDailyFinancial.find(params[:id])
- respond_to do |format|
- flash[:notice] = 'Updated'
- format.html { redirect_to(:controller => "home", :action => "admin") }
- else
- format.html {render :action => "edit"}
- end
- end
- end
Add Comment
Please, Sign In to add comment