Class: Tokite::TransfersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Tokite::TransfersController
- Defined in:
- app/controllers/tokite/transfers_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 |
# File 'app/controllers/tokite/transfers_controller.rb', line 9 def create @transfer = Transfer.create!(rule_id: params[:rule_id], user_id: params[:transfer][:user_id]) redirect_to user_path(@transfer.rule.user_id) end |
#new ⇒ Object
3 4 5 6 7 |
# File 'app/controllers/tokite/transfers_controller.rb', line 3 def new @transfer = Transfer.new(rule_id: params[:rule_id]) @rule = @transfer.rule @users = User.where.not(id: @rule.user_id) end |