Sha256: 77c9754b32185b73e13c7373b814cebeff06bf0409c09d844a2818e20977619b

Contents?: true

Size: 427 Bytes

Versions: 93

Compression:

Stored size: 427 Bytes

Contents

module Tenon
  class SettingsController < Tenon::BaseController
    def update
      authorize! :update, Tenon::MySettings
      params[:settings].each { |key, value| Tenon::MySettings.send((key + '=').to_sym, value) }
      flash[:notice] = 'Your settings have been saved.'
      redirect_to settings_path
    end

    def show
      authorize! :update, Tenon::MySettings
      @settings = Tenon::MySettings
    end
  end
end

Version data entries

93 entries across 93 versions & 1 rubygems

Version Path
tenon-1.1.8 app/controllers/tenon/settings_controller.rb
tenon-1.1.7 app/controllers/tenon/settings_controller.rb
tenon-1.1.6 app/controllers/tenon/settings_controller.rb
tenon-2.1.0 app/controllers/tenon/settings_controller.rb
tenon-2.0.8 app/controllers/tenon/settings_controller.rb
tenon-2.0.7 app/controllers/tenon/settings_controller.rb
tenon-2.0.6 app/controllers/tenon/settings_controller.rb
tenon-2.0.5 app/controllers/tenon/settings_controller.rb
tenon-2.0.4 app/controllers/tenon/settings_controller.rb
tenon-2.0.3 app/controllers/tenon/settings_controller.rb
tenon-2.0.2 app/controllers/tenon/settings_controller.rb
tenon-2.0.1 app/controllers/tenon/settings_controller.rb
tenon-2.0.0 app/controllers/tenon/settings_controller.rb
tenon-1.1.5 app/controllers/tenon/settings_controller.rb
tenon-1.1.4 app/controllers/tenon/settings_controller.rb
tenon-1.1.3 app/controllers/tenon/settings_controller.rb
tenon-1.1.2 app/controllers/tenon/settings_controller.rb
tenon-1.1.1 app/controllers/tenon/settings_controller.rb
tenon-1.0.76 app/controllers/tenon/settings_controller.rb
tenon-1.0.75 app/controllers/tenon/settings_controller.rb