Form helpers for globalize3.
###Installing gem:
When using bundler put this in your Gemfile:
gem 'globalize3_helpers', :git => 'https://github.com/rui-castro/globalize3_helpers.git'
Inside your model:
accepts_nested_attributes_for :translations
Supports form_for and simple_form
With array of locales: (haml syntax)
- f.globalize_fields_for_locales [ :en, :el ] do |l|
= l.input :name, input_html: { :class => :span5 }
= l.input :description, as: :text, input_html: { :class => 'span6 without_radius' }
With single locale: (haml syntax)
- f.globalize_fields_for_locale :en do |l|
= l.input :name, input_html: { :class => :span5 }
= l.input :description, as: :text, input_html: { :class => 'span6 without_radius' }
- Fork the code, add more helpers
- Most important contribution would be testing
I know the current code has a lot of duplication, in the next days i will fix it.
Copyright (c) 2012 Lefteris Georgatos. See LICENSE.txt for further details.