Class: BootstrapForm::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/bootstrap_form/configuration.rb

Instance Method Summary collapse

Instance Method Details

#default_form_attributesObject



21
22
23
24
25
26
27
# File 'lib/bootstrap_form/configuration.rb', line 21

def default_form_attributes
  BootstrapForm.deprecator.warn("    BootstrapForm::Configuration#default_form_attributes will be removed in a future release.\n    Please use BootstrapForm.config.default_form_attributes instead.\n  MESSAGE\n  BootstrapForm.config.default_form_attributes\nend\n".squish)

#default_form_attributes=(attributes) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/bootstrap_form/configuration.rb', line 5

def default_form_attributes=(attributes)
  case attributes
  when nil
    @default_form_attributes = {}
  when Hash
    BootstrapForm.deprecator.warn("      BootstrapForm::Configuration#default_form_attributes= will be removed in a future release.\n      Please use BootstrapForm.config.default_form_attributes= instead.\n    MESSAGE\n    @default_form_attributes = attributes\n    BootstrapForm.config.default_form_attributes = attributes\n  else\n    raise ArgumentError, \"Unsupported default_form_attributes \#{attributes.inspect}\"\n  end\nend\n".squish)