Class: AdminAssistant::FormSettings
- Inherits:
-
AbstractSettings
- Object
- AbstractSettings
- AdminAssistant::FormSettings
- Defined in:
- lib/admin_assistant/builder.rb
Instance Attribute Summary collapse
-
#multi ⇒ Object
writeonly
Sets the attribute multi.
-
#submit_buttons ⇒ Object
readonly
Returns the value of attribute submit_buttons.
Instance Method Summary collapse
- #column_config_fields ⇒ Object
- #column_names ⇒ Object
- #columns_for_edit(*args) ⇒ Object
- #columns_for_new(*args) ⇒ Object
-
#initialize(admin_assistant) ⇒ FormSettings
constructor
A new instance of FormSettings.
- #multi? ⇒ Boolean
Methods inherited from AbstractSettings
Constructor Details
#initialize(admin_assistant) ⇒ FormSettings
Returns a new instance of FormSettings.
159 160 161 162 163 |
# File 'lib/admin_assistant/builder.rb', line 159 def initialize(admin_assistant) super @submit_buttons = [] @multi = false end |
Instance Attribute Details
#multi=(value) ⇒ Object (writeonly)
Sets the attribute multi
156 157 158 |
# File 'lib/admin_assistant/builder.rb', line 156 def multi=(value) @multi = value end |
#submit_buttons ⇒ Object (readonly)
Returns the value of attribute submit_buttons.
157 158 159 |
# File 'lib/admin_assistant/builder.rb', line 157 def @submit_buttons end |
Instance Method Details
#column_config_fields ⇒ Object
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/admin_assistant/builder.rb', line 165 def column_config_fields {:clear_link => :accessor, :datetime_select_options => [:accessor, {}], :date_select_options => [:accessor, {}], :default => :block, :description => :accessor, :exclude_blank => :boolean, :image_size => :accessor, :input => :accessor, :read_only => :boolean, :select_choices => :accessor, :select_options => [ :accessor, Proc.new { |v| v ||= {} unless v.has_key?(:include_blank) v[:include_blank] = true end v } ], :text_area_options => [:accessor, {}], :write_once => :boolean } end |
#column_names ⇒ Object
202 203 204 |
# File 'lib/admin_assistant/builder.rb', line 202 def column_names @column_names || @admin_assistant.default_column_names end |
#columns_for_edit(*args) ⇒ Object
186 187 188 189 190 191 192 |
# File 'lib/admin_assistant/builder.rb', line 186 def columns_for_edit(*args) if args.empty? @columns_for_edit || column_names else @columns_for_edit = args end end |
#columns_for_new(*args) ⇒ Object
194 195 196 197 198 199 200 |
# File 'lib/admin_assistant/builder.rb', line 194 def columns_for_new(*args) if args.empty? @columns_for_new || column_names else @columns_for_new = args end end |
#multi? ⇒ Boolean
206 207 208 |
# File 'lib/admin_assistant/builder.rb', line 206 def multi? @multi end |