Class: Releasable::ReleasesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Releasable::ReleasesController
- Defined in:
- app/controllers/releasable/releases_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/releasable/releases_controller.rb', line 15 def create @release = Release.new(release_params) if @release.save redirect_to releases_path, notice: "Release #{@release.key} has been created" else render :new end end |
#destroy ⇒ Object
35 36 37 38 39 40 |
# File 'app/controllers/releasable/releases_controller.rb', line 35 def destroy @release = retrieve_release @release.destroy redirect_to releases_path, notice: "Release #{@release.key} has been deleted" end |
#edit ⇒ Object
11 12 13 |
# File 'app/controllers/releasable/releases_controller.rb', line 11 def edit @release = retrieve_release end |
#index ⇒ Object
3 4 5 |
# File 'app/controllers/releasable/releases_controller.rb', line 3 def index @releases = Release.all end |
#new ⇒ Object
7 8 9 |
# File 'app/controllers/releasable/releases_controller.rb', line 7 def new @release = Release.new end |
#update ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'app/controllers/releasable/releases_controller.rb', line 25 def update @release = retrieve_release if @release.update(release_params) redirect_to releases_path, notice: "Release #{@release.key} has been updated" else render :edit end end |