Skip to content

sudosu/rails_admin_mongoid_localize_field

 
 

Repository files navigation

RailsAdminMongoidLocalizeField

Adds to RailsAdmin support for mongoid localized fields.

Installation

In your Gemfileadd the following dependencies:

gem "rails_admin_mongoid_localize_field", "~> 0.1.2"

Run:

$ bundle install

Usage

Just by telling the field to localize:

class Category
  include Mongoid::Document

  field :name, type: String, localize: true
  field :description, type: String, localize: true
end

If you didn't like ui tabs, you can remove them and use simple form template by using tabbed option:

# config/initializer/rails_admin.rb

config.model 'Category' do
  edit do
    field :name do
      tabbed false
    end
    field :description do
      tabbed false
    end
  end
end

Screenshot

Screenshot

Dependencies

  • haml
  • mongoid >= 3.0
  • rails >= 3.0
  • rails_admin >= 0.5

This project rocks and uses MIT-LICENSE.

About

adds rails_admin support for mongoid localized fields

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%