Sha256: 15965d00a7d1a54d787c33fb3bec1ddb9bdf3c8659d033adbef449ca1587d571

Contents?: true

Size: 860 Bytes

Versions: 2

Compression:

Stored size: 860 Bytes

Contents

# encoding: utf-8
require 'rails-settings-ui/engine'
require 'rails-settings-ui/main_app_route_delegator'
require 'rails-settings-ui/version'

require "rails-settings-ui/type_converter"

module RailsSettingsUi
  mattr_accessor :parent_controller
  self.parent_controller = '::ApplicationController'

  # Settings not displayed in the interface (eg. [:launch_mode, :project_name])
  mattr_accessor :ignored_settings
  self.ignored_settings = []

  # Settings displayed in the interface as select tag instead checkboxes (useful for array with one possible choice)
  mattr_accessor :settings_displayed_as_select_tag
  self.settings_displayed_as_select_tag = []

  class << self
    def inline_main_app_routes!
      ::RailsSettingsUi::ApplicationController.helper ::RailsSettingsUi::MainAppRouteDelegator
    end

    def setup
      yield self
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails-settings-ui-0.1.1 lib/rails-settings-ui.rb
rails-settings-ui-0.1.0 lib/rails-settings-ui.rb