Module: CardController::Rest
- Includes:
- ActionController::HttpAuthentication::Token
- Included in:
- CardController
- Defined in:
- decko/lib/card_controller/rest.rb
Overview
helper method for RESTful action methods for card
Instance Method Summary collapse
-
#asset ⇒ Object
deprecated
Deprecated.
-
#create ⇒ Object
-
#delete ⇒ Object
-
#read ⇒ Object
-
#update ⇒ Object
Instance Method Details
#asset ⇒ Object
Deprecated.
23 24 25 26 27 |
# File 'decko/lib/card_controller/rest.rb', line 23 def asset body = "Decko installation error: missing public directory symlinks" Rails.logger.info "#{body}.\n >>> Try `rake card:mod:symlink`" render body: body, status: 404 end |
#create ⇒ Object
6 7 8 |
# File 'decko/lib/card_controller/rest.rb', line 6 def create handle { card.save! } end |
#delete ⇒ Object
18 19 20 |
# File 'decko/lib/card_controller/rest.rb', line 18 def delete handle { card.delete! } end |
#read ⇒ Object
10 11 12 |
# File 'decko/lib/card_controller/rest.rb', line 10 def read show end |
#update ⇒ Object
14 15 16 |
# File 'decko/lib/card_controller/rest.rb', line 14 def update card.new_card? ? create : handle { card.update! params[:card]&.to_unsafe_h } end |