Class: Admin::Odania::LanguagesController
- Inherits:
-
AdminController
- Object
- AdminController
- Admin::Odania::LanguagesController
- Defined in:
- app/controllers/admin/odania/languages_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /admin/languages.
-
#destroy ⇒ Object
DELETE /admin/languages/1.
-
#edit ⇒ Object
GET /admin/languages/1/edit.
-
#index ⇒ Object
GET /admin/languages.
-
#new ⇒ Object
GET /admin/languages/new.
-
#show ⇒ Object
GET /admin/languages/1.
-
#update ⇒ Object
PATCH/PUT /admin/languages/1.
Instance Method Details
#create ⇒ Object
POST /admin/languages
23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/admin/odania/languages_controller.rb', line 23 def create @admin_language = Odania::Language.new(admin_language_params) if @admin_language.save redirect_to admin_odania_languages_path, notice: 'Language was successfully created.' else render action: 'new' end end |
#destroy ⇒ Object
DELETE /admin/languages/1
43 44 45 46 |
# File 'app/controllers/admin/odania/languages_controller.rb', line 43 def destroy @admin_language.destroy redirect_to admin_odania_languages_url, notice: 'Language was successfully destroyed.' end |
#edit ⇒ Object
GET /admin/languages/1/edit
19 20 |
# File 'app/controllers/admin/odania/languages_controller.rb', line 19 def edit end |
#index ⇒ Object
GET /admin/languages
5 6 7 |
# File 'app/controllers/admin/odania/languages_controller.rb', line 5 def index @admin_languages = Odania::Language.all end |
#new ⇒ Object
GET /admin/languages/new
14 15 16 |
# File 'app/controllers/admin/odania/languages_controller.rb', line 14 def new @admin_language = Odania::Language.new end |
#show ⇒ Object
GET /admin/languages/1
10 11 |
# File 'app/controllers/admin/odania/languages_controller.rb', line 10 def show end |
#update ⇒ Object
PATCH/PUT /admin/languages/1
34 35 36 37 38 39 40 |
# File 'app/controllers/admin/odania/languages_controller.rb', line 34 def update if @admin_language.update(admin_language_params) redirect_to admin_odania_languages_path, notice: 'Language was successfully updated.' else render action: 'edit' end end |