Class: Gemgento::Magento::UserGroupsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- ApplicationController
- BaseController
- Gemgento::Magento::UserGroupsController
- Defined in:
- app/controllers/gemgento/magento/user_groups_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Instance Method Details
#destroy ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/controllers/gemgento/magento/user_groups_controller.rb', line 13 def destroy if @user_group = UserGroup.find_by(magento_id: params[:id]) @user_group.destroy end render nothing: true end |
#update ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/controllers/gemgento/magento/user_groups_controller.rb', line 5 def update @user_group = UserGroup.find_or_initialize_by(magento_id: params[:id]) @user_group.code = params[:data][:code] @user_group.save render nothing: true end |