Class: IshManager::MapsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- IshManager::MapsController
- Defined in:
- app/controllers/ish_manager/maps_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/controllers/ish_manager/maps_controller.rb', line 24 def create @map = ::Gameui::Map.new(map_params) :create, @map respond_to do |format| if @map.save format.html { redirect_to map_path(@map), notice: 'Map was successfully created.' } else format.html { render :new } end end end |
#destroy ⇒ Object
48 49 50 51 52 53 54 |
# File 'app/controllers/ish_manager/maps_controller.rb', line 48 def destroy :destroy, @map @map.destroy respond_to do |format| format.html { redirect_to maps_path, notice: 'Map was successfully destroyed.' } end end |
#edit ⇒ Object
20 21 22 |
# File 'app/controllers/ish_manager/maps_controller.rb', line 20 def edit :edit, @map end |
#index ⇒ Object
6 7 8 9 |
# File 'app/controllers/ish_manager/maps_controller.rb', line 6 def index :index, ::Gameui::Map @maps = ::Gameui::Map.all end |
#new ⇒ Object
15 16 17 18 |
# File 'app/controllers/ish_manager/maps_controller.rb', line 15 def new :new, ::Gameui::Map @map = ::Gameui::Map.new end |
#show ⇒ Object
11 12 13 |
# File 'app/controllers/ish_manager/maps_controller.rb', line 11 def show :show, @map end |
#update ⇒ Object
37 38 39 40 41 42 43 44 45 46 |
# File 'app/controllers/ish_manager/maps_controller.rb', line 37 def update :update, @map respond_to do |format| if @map.update(map_params) format.html { redirect_to map_path(@map), notice: 'Map was successfully updated.' } else format.html { render :edit } end end end |