Class: Panel::LinesController
- Inherits:
-
BaseController
- Object
- BaseController
- Panel::LinesController
- Defined in:
- app/controllers/ship/panel/lines_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/controllers/ship/panel/lines_controller.rb', line 13 def create @line = Line.new(line_params) unless @line.save render :new, locals: { model: @line }, status: :unprocessable_entity end end |
#destroy ⇒ Object
35 36 37 |
# File 'app/controllers/ship/panel/lines_controller.rb', line 35 def destroy @line.destroy end |
#edit ⇒ Object
24 25 |
# File 'app/controllers/ship/panel/lines_controller.rb', line 24 def edit end |
#index ⇒ Object
5 6 7 |
# File 'app/controllers/ship/panel/lines_controller.rb', line 5 def index @lines = Line.page(params[:page]) end |
#new ⇒ Object
9 10 11 |
# File 'app/controllers/ship/panel/lines_controller.rb', line 9 def new @line = Line.new end |
#show ⇒ Object
21 22 |
# File 'app/controllers/ship/panel/lines_controller.rb', line 21 def show end |
#update ⇒ Object
27 28 29 30 31 32 33 |
# File 'app/controllers/ship/panel/lines_controller.rb', line 27 def update @line.assign_attributes(line_params) unless @line.save render :edit, locals: { model: @line }, status: :unprocessable_entity end end |