https://github.com/tomasc/simple_form_localized_input
Custom input for Simple Form that renders Mongoid fields for multiple locales.
https://github.com/tomasc/simple_form_localized_input
Last synced: 3 days ago
JSON representation
Custom input for Simple Form that renders Mongoid fields for multiple locales.
- Host: GitHub
- URL: https://github.com/tomasc/simple_form_localized_input
- Owner: tomasc
- License: mit
- Created: 2014-07-08T16:41:13.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2025-10-22T08:20:12.000Z (8 months ago)
- Last Synced: 2025-10-22T10:20:01.710Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Form Localized Input
[](https://travis-ci.org/tomasc/simple_form_localized_input) [](http://badge.fury.io/rb/simple_form_localized_input) [](https://coveralls.io/r/tomasc/simple_form_localized_input)
[Simple Form](https://github.com/plataformatec/simple_form) custom input which renders a field for multiple locales in one form. Designed to be used with [Mongoid](https://github.com/mongoid/mongoid).
## Installation
Add this line to your application's Gemfile:
gem 'simple_form_localized_input'
And then execute:
$ bundle
Or install it yourself as:
$ gem install simple_form_localized_input
## Usage
In your model:
```Ruby
class MyModel
include Mongoid::Document
field :title, type: String, localize: true
end
```
In your simple form:
```Ruby
= form.localized_input :title
```
This works with inputs of various types, and you can pass options to an input as usual.
## Contributing
1. Fork it ( https://github.com/tomasc/simple_form_localized_input/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request