Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Вызываю метод
- <%= link_to 'Продать', sell_item_modal_path(:user_item => obj.id), method: :post, remote: true %>
- # Сам контроллер, который рендерит модальное окно
- class SellsController < ApplicationController
- before_action :logged_in_user
- def sell
- puts 'in sell'
- puts
- puts request.params
- end
- def new_sell
- @sell_item = Inventory.find(request.params['user_item'])
- respond_to do |format|
- format.html
- format.js
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement