Class: Admin::EmbeddableHostsController
- Inherits:
-
AdminController
- Object
- AdminController
- Admin::EmbeddableHostsController
- Defined in:
- app/controllers/admin/embeddable_hosts_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
4 5 6 |
# File 'app/controllers/admin/embeddable_hosts_controller.rb', line 4 def create save_host(EmbeddableHost.new, :create) end |
#destroy ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/admin/embeddable_hosts_controller.rb', line 13 def destroy host = EmbeddableHost.where(id: params[:id]).first host.destroy StaffActionLogger.new(current_user).( host, UserHistory.actions[:embeddable_host_destroy], ) render json: success_json end |
#update ⇒ Object
8 9 10 11 |
# File 'app/controllers/admin/embeddable_hosts_controller.rb', line 8 def update host = EmbeddableHost.where(id: params[:id]).first save_host(host, :update) end |