Class: MyDashboard::WidgetsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- MyDashboard::WidgetsController
- Defined in:
- app/controllers/my_dashboard/widgets_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
10 11 12 |
# File 'app/controllers/my_dashboard/widgets_controller.rb', line 10 def show render file: , layout: false end |
#update ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/controllers/my_dashboard/widgets_controller.rb', line 14 def update data = params[:widget] || {} hash = data.merge(id: params[:name], updatedAt: Time.now.utc.to_i) MyDashboard.redis.publish("#{MyDashboard.config.redis_namespace}.create", hash.to_json) render nothing: true end |