Skip to content

infernalmaster/rails_admin_mongo_loc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RailsAdminMongoLoc

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

Important!

For new versions ( >= 0.5 ) of rails_admin there is a gem rails_admin_mongoid_localize_field

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages