Class: Qadmin::Configuration
- Inherits:
-
Object
- Object
- Qadmin::Configuration
- Defined in:
- lib/qadmin/configuration.rb
Instance Attribute Summary collapse
-
#available_actions ⇒ Object
Returns the value of attribute available_actions.
-
#column_headers ⇒ Object
Returns the value of attribute column_headers.
-
#controller_klass ⇒ Object
Returns the value of attribute controller_klass.
-
#controls ⇒ Object
Returns the value of attribute controls.
-
#default_scope ⇒ Object
Returns the value of attribute default_scope.
-
#display_columns ⇒ Object
Returns the value of attribute display_columns.
-
#model_collection_name ⇒ Object
Returns the value of attribute model_collection_name.
-
#model_human_name ⇒ Object
Returns the value of attribute model_human_name.
-
#model_instance_name ⇒ Object
Returns the value of attribute model_instance_name.
-
#model_name ⇒ Object
Returns the value of attribute model_name.
-
#multipart_forms ⇒ Object
Returns the value of attribute multipart_forms.
-
#ports ⇒ Object
Returns the value of attribute ports.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
- #model_klass ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/qadmin/configuration.rb', line 17 def initialize( = {}) () self.available_actions = Qadmin::OptionSet.new([:index, :show, :new, :create, :edit, :update, :destroy], [:available_actions] || {}) self.display_columns = Qadmin::OptionSet.new(model_column_names, [:display_columns] || {}) self.multipart_forms = [:multipart_forms] || false self.default_scope = [:default_scope] || false self.ports = [:ports] || false self.controls = [:controls] || [] self.column_headers = HashWithIndifferentAccess.new([:column_headers] || {}) end |
Instance Attribute Details
#available_actions ⇒ Object
Returns the value of attribute available_actions.
4 5 6 |
# File 'lib/qadmin/configuration.rb', line 4 def available_actions @available_actions end |
#column_headers ⇒ Object
Returns the value of attribute column_headers.
4 5 6 |
# File 'lib/qadmin/configuration.rb', line 4 def column_headers @column_headers end |
#controller_klass ⇒ Object
Returns the value of attribute controller_klass.
4 5 6 |
# File 'lib/qadmin/configuration.rb', line 4 def controller_klass @controller_klass end |
#controls ⇒ Object
Returns the value of attribute controls.
4 5 6 |
# File 'lib/qadmin/configuration.rb', line 4 def controls @controls end |
#default_scope ⇒ Object
Returns the value of attribute default_scope.
4 5 6 |
# File 'lib/qadmin/configuration.rb', line 4 def default_scope @default_scope end |
#display_columns ⇒ Object
Returns the value of attribute display_columns.
4 5 6 |
# File 'lib/qadmin/configuration.rb', line 4 def display_columns @display_columns end |
#model_collection_name ⇒ Object
Returns the value of attribute model_collection_name.
4 5 6 |
# File 'lib/qadmin/configuration.rb', line 4 def model_collection_name @model_collection_name end |
#model_human_name ⇒ Object
Returns the value of attribute model_human_name.
4 5 6 |
# File 'lib/qadmin/configuration.rb', line 4 def model_human_name @model_human_name end |
#model_instance_name ⇒ Object
Returns the value of attribute model_instance_name.
4 5 6 |
# File 'lib/qadmin/configuration.rb', line 4 def model_instance_name @model_instance_name end |
#model_name ⇒ Object
Returns the value of attribute model_name.
4 5 6 |
# File 'lib/qadmin/configuration.rb', line 4 def model_name @model_name end |
#multipart_forms ⇒ Object
Returns the value of attribute multipart_forms.
4 5 6 |
# File 'lib/qadmin/configuration.rb', line 4 def multipart_forms @multipart_forms end |
#ports ⇒ Object
Returns the value of attribute ports.
4 5 6 |
# File 'lib/qadmin/configuration.rb', line 4 def ports @ports end |
Instance Method Details
#model_klass ⇒ Object
28 29 30 |
# File 'lib/qadmin/configuration.rb', line 28 def model_klass self.model_name.constantize end |