Reputation: 1744
I'm a RoR junior and I'm making online shop app, so:
@line_item
@line_item = LineItem.new
create.js.erb
file in views/line_items
My create action of line_items_controller
looks like this:
respond_to do |format|
format.js { }
end
QUESTION: How to make a popup window with line_item's details information appearing when line item's create form is submitted?
Upvotes: 0
Views: 660
Reputation: 14295
You don't need that line in the controller there - all you need is to trigger the display of a popup inside your create.js.erb. That js file will be rendered by convention after executing the create controller method because it is an asynchronous call.
Upvotes: 1