Class: Fluffery::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/fluffery/config.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|Fluffery::Config| ... } ⇒ Config

Returns a new instance of Config.

Yields:



22
23
24
# File 'lib/fluffery/config.rb', line 22

def initialize
  yield Fluffery::Config if block_given?
end

Class Method Details

.domObject



18
19
20
# File 'lib/fluffery/config.rb', line 18

def self.dom
  @dom ||= {}
end

.formsObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/fluffery/config.rb', line 5

def self.forms
  @forms ||= {
    :error_class         => 'field_with_errors',
    :message_error_class => 'errors_for_field',
    :error_template      => %{
          <span class="<%= error_class %>">
               <%= html_tag %>
               <span class="<%= message_error_class %>"><%= [messages].flatten.join(",") %></span>
          </span>
        }
      }
end