Class: Wobauth::AuthoritiesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Wobauth::AuthoritiesController
- Defined in:
- app/controllers/wobauth/authorities_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#create ⇒ Object
POST /authorities.
-
#destroy ⇒ Object
DELETE /authorities/1.
-
#edit ⇒ Object
GET /authorities/1/edit.
-
#index ⇒ Object
GET /authorities.
-
#new ⇒ Object
GET /authorities/new.
-
#show ⇒ Object
GET /authorities/1.
-
#update ⇒ Object
PATCH/PUT /authorities/1.
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
POST /authorities
37 38 39 40 41 42 43 44 45 46 47 |
# File 'app/controllers/wobauth/authorities_controller.rb', line 37 def create myparams = .merge() if .present? = ..new(myparams) else = Authority.new(myparams) end .save respond_with(, location: location) end |
#destroy ⇒ Object
DELETE /authorities/1
56 57 58 59 |
# File 'app/controllers/wobauth/authorities_controller.rb', line 56 def destroy .destroy respond_with(, location: location) end |
#edit ⇒ Object
GET /authorities/1/edit
33 34 |
# File 'app/controllers/wobauth/authorities_controller.rb', line 33 def edit end |
#index ⇒ Object
GET /authorities
12 13 14 15 |
# File 'app/controllers/wobauth/authorities_controller.rb', line 12 def index = Authority.accessible_by(current_ability, :read) respond_with() end |
#new ⇒ Object
GET /authorities/new
23 24 25 26 27 28 29 30 |
# File 'app/controllers/wobauth/authorities_controller.rb', line 23 def new if .present? = ..new() else = Authority.new() end respond_with() end |
#show ⇒ Object
GET /authorities/1
18 19 20 |
# File 'app/controllers/wobauth/authorities_controller.rb', line 18 def show respond_with() end |
#update ⇒ Object
PATCH/PUT /authorities/1
50 51 52 53 |
# File 'app/controllers/wobauth/authorities_controller.rb', line 50 def update .update() respond_with(, location: location) end |