Sha256: 6977bdfa1516afc573cc373122b3f94b9d0ebb856cd5eb7b00b47816f1353bf2

Contents?: true

Size: 334 Bytes

Versions: 6

Compression:

Stored size: 334 Bytes

Contents

= form.fields_for field.translations_field do |localized_field|
  - I18n.available_locales.each do |locale|
    - val = form.object.send("#{field.name}_translations").try(:[], locale.to_s)
    %div
      = localized_field.label locale
      = localized_field.send field_type, locale, html_attributes.reverse_merge({ :value => val })

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
rails_admin_translate-0.4.1 app/views/rails_admin/main/form_types/_form_simple.html.haml
rails_admin_translate-0.4.0 app/views/rails_admin/main/form_types/_form_simple.html.haml
rails_admin_hstore_translate-0.3.0 app/views/rails_admin/main/form_types/_form_simple.html.haml
rails_admin_hstore_translate-0.2.1 app/views/rails_admin/main/form_types/_form_simple.html.haml
rails_admin_hstore_translate-0.2.0 app/views/rails_admin/main/form_types/_form_simple.html.haml
rails_admin_hstore_translate-0.1.1 app/views/rails_admin/main/form_types/_form_simple.html.haml