Class: Game2048::AestheticsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Game2048::AestheticsController
- Defined in:
- app/controllers/game_2048/aesthetics_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
5 6 |
# File 'app/controllers/game_2048/aesthetics_controller.rb', line 5 def edit end |
#preview ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/controllers/game_2048/aesthetics_controller.rb', line 16 def preview if @aesthetic.update(aesthetic_params) render partial: "game2048/preview_board", layout: false else render json: { error: @aesthetic.errors. }, status: :unprocessable_entity end end |
#update ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/controllers/game_2048/aesthetics_controller.rb', line 8 def update if @aesthetic.update(aesthetic_params) redirect_to edit_game_2048_aesthetic_path, notice: "2048 theme updated successfully." else render :edit end end |