Class: Alchemy::Admin::IngredientsController

Inherits:
BaseController
  • Object
show all
Includes:
CropAction
Defined in:
app/controllers/alchemy/admin/ingredients_controller.rb

Instance Method Summary collapse

Methods included from CropAction

#crop

Methods inherited from BaseController

#leave

Instance Method Details

#editObject



12
13
14
15
# File 'app/controllers/alchemy/admin/ingredients_controller.rb', line 12

def edit
  @language = Alchemy::Language.find_by(id: params[:language_id]) ||
    Alchemy::Current.language
end

#updateObject



17
18
19
20
# File 'app/controllers/alchemy/admin/ingredients_controller.rb', line 17

def update
  @page = @ingredient.page # necessary to a render picture ingredient component
  @ingredient.update(ingredient_params)
end