Top Level Namespace

Defined Under Namespace

Modules: Motr, MotrHelper, ToSlug

Instance Method Summary collapse

Instance Method Details

#configObject

Configures Motr, including extensions/modules. See information below for more info



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/generators/templates/motr.rb', line 5

Motr.configure do |config|
  
  # => Forms configuration
  # Configures various options for the form builder
  # config.forms.do |forms|
  #  The html class to be used when wrapping a field with an error
  #   forms.error_class = 'field_with_errors'
  #   
  # The html class to be added to the "message" on each field 
  #   forms.message_error_class = 'errors_for_field'
  # 
  # The ERB based error template to be used when wrapping an errored field
  # It provides the methods "error_class", "message_error_class", and "messages" (array of errors)
  #   forms.error_template = %{ <span class="<%= error_class %>"><%= html_tag %><span class="<%= message_error_class %>"><%= [messages].flatten.join(",") %></span>}
  # 
  # The default form builder to use site-wide
  #   forms.default_builder = Motr::Forms::Builder
  # 
  # end
  
end