Module: RailsSettingsUi

Defined in:
lib/rails-settings-ui.rb,
lib/rails-settings-ui/engine.rb,
lib/rails-settings-ui/version.rb,
lib/rails-settings-ui/settings_form_coercible.rb,
lib/rails-settings-ui/settings_form_validator.rb,
lib/generators/rails_settings_ui/install_generator.rb,
app/controllers/rails_settings_ui/application_controller.rb

Defined Under Namespace

Modules: CustomPredicates, Generators, MainAppRouteDelegator, SettingsHelper, Types Classes: ApplicationController, Engine, NotCoercibleError, SettingsController, SettingsFormCoercible, SettingsFormValidator, SettingsSchema

Constant Summary collapse

VERSION =
'1.3.1'

Class Method Summary collapse

Class Method Details

.default_settingsObject


40
41
42
43
44
45
46
# File 'lib/rails-settings-ui.rb', line 40

def default_settings
  if Gem.loaded_specs['rails-settings-cached'].version.to_s >= '0.6.0'
    RailsSettings::Default.instance.with_indifferent_access
  else
    RailsSettingsUi.settings_klass.defaults
  end
end

.inline_main_app_routes!Object


28
29
30
# File 'lib/rails-settings-ui.rb', line 28

def inline_main_app_routes!
  ::RailsSettingsUi::ApplicationController.helper ::RailsSettingsUi::MainAppRouteDelegator
end

.settings_klassObject


36
37
38
# File 'lib/rails-settings-ui.rb', line 36

def settings_klass
  settings_class.constantize
end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:


32
33
34
# File 'lib/rails-settings-ui.rb', line 32

def setup
  yield self
end