Sha256: 6c6a71d8517c56af9eb01d530284e5a22bf884d09c62591ba3cc1ed3f087bbf9
Contents?: true
Size: 574 Bytes
Versions: 31
Compression:
Stored size: 574 Bytes
Contents
module InsightsCloud class SettingsController < ::ApplicationController def show render_setting(:insightsSyncEnabled, :allow_auto_insights_sync) end def update Setting[:allow_auto_insights_sync] = settings_params render_setting(:insightsSyncEnabled, :allow_auto_insights_sync) end private def render_setting(node_name, setting) render json: { node_name => Setting[setting], } end def settings_params ActiveModel::Type::Boolean.new.cast(params.require(:insightsSyncEnabled)) end end end
Version data entries
31 entries across 31 versions & 1 rubygems