diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index fa75efa..b073dbb 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,10 +1,10 @@ - + <%= csrf_meta_tag %> <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js", :defaults %> - <%= stylesheet_link_tag 'scaffold', 'style' %> + <%= stylesheet_link_tag 'scaffold', 'style', 'formtastic', 'formtastic_changes', :cache => :all %> - \ No newline at end of file + diff --git a/app/views/layouts/application.html.erb~ b/app/views/layouts/application.html.erb~ new file mode 100644 index 0000000..b073dbb --- /dev/null +++ b/app/views/layouts/application.html.erb~ @@ -0,0 +1,24 @@ + + + <%= csrf_meta_tag %> + <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", + "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js", + :defaults %> + <%= stylesheet_link_tag 'scaffold', 'style', 'formtastic', 'formtastic_changes', :cache => :all %> + + + + <% flash.each_key do |flash_key| %> +
+ <%=h flash[flash_key] %> +
+ <% end %> +
+
+ <%= yield %> +
+
+ + diff --git a/config/initializers/formtastic.rb b/config/initializers/formtastic.rb new file mode 100644 index 0000000..76f76a9 --- /dev/null +++ b/config/initializers/formtastic.rb @@ -0,0 +1,51 @@ +# Set the default text field size when input is a string. Default is 50. +# Formtastic::SemanticFormBuilder.default_text_field_size = 50 + +# Should all fields be considered "required" by default? +# Defaults to true, see ValidationReflection notes below. +# Formtastic::SemanticFormBuilder.all_fields_required_by_default = true + +# Should select fields have a blank option/prompt by default? +# Defaults to true. +# Formtastic::SemanticFormBuilder.include_blank_for_select_by_default = true + +# Set the string that will be appended to the labels/fieldsets which are required +# It accepts string or procs and the default is a localized version of +# '*'. In other words, if you configure formtastic.required +# in your locale, it will replace the abbr title properly. But if you don't want to use +# abbr tag, you can simply give a string as below +# Formtastic::SemanticFormBuilder.required_string = "(required)" + +# Set the string that will be appended to the labels/fieldsets which are optional +# Defaults to an empty string ("") and also accepts procs (see required_string above) +# Formtastic::SemanticFormBuilder.optional_string = "(optional)" + +# Set the way inline errors will be displayed. +# Defaults to :sentence, valid options are :sentence, :list and :none +# Formtastic::SemanticFormBuilder.inline_errors = :sentence + +# Set the method to call on label text to transform or format it for human-friendly +# reading when formtastic is user without object. Defaults to :humanize. +# Formtastic::SemanticFormBuilder.label_str_method = :humanize + +# Set the array of methods to try calling on parent objects in :select and :radio inputs +# for the text inside each @