voldy / rails_admin_mongo_loc

adds rails_admin support for mongoid localized fields

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RailsAdminMongoLoc

Adds to RailsAdmin support for mongoid localized fields. Based on gem "localized_fields"

Installation

In your Gemfileadd the following dependencies:

gem 'rails_admin_mongo_loc', :require => 'rails_admin_mongo_loc', :git => 'git://github.com/infernalmaster/rails_admin_mongo_loc'

Run:

$ bundle install

Usage

Gem creates two new field types for RailsAdmin:

This fields accept all cofigurations as their native analogs

###Fields - overring field type (more is there https://github.com/sferik/rails_admin/wiki/Railsadmin-DSL)

Fast start. If you would like to configure fields in the default group without changing the other fields already included in the default group, you can use the configure block like this:

RailsAdmin.config do |config|
  config.model Team do
    edit do
      configure :description, :stringml do
        # configuration here
      end
    end
  end
end

If no configuration needs to take place the configuration block could have been left out:

RailsAdmin.config do |config|
  config.model Team do
    edit do
      field :description, :stringml
    end
  end
end

This project rocks and uses MIT-LICENSE.

About

adds rails_admin support for mongoid localized fields

License:MIT License


Languages

Language:Ruby 100.0%