Last active
August 29, 2015 14:08
-
-
Save wwwbruno/4e07289a3ff9ad6173aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reference https://github.com/globalize/globalize | |
| # To create new records when using Globalize | |
| # to enter in rails console | |
| rails c | |
| # set the locale to English | |
| I18n.locale = :en | |
| # create a new record with English locale | |
| Affiliate.create(name: 'The big hotel', description: 'Sed non varius ex. Vivamus ac massa non eros dignissim tincidunt at nec est. Donec dapibus tempus lacus, eget cursus arcu fermentum et. Nulla fermentum quis dui sit amet tincidunt. Quisque at odio neque. Aenean augue ipsum, molestie et nunc sed, pharetra aliquam lorem.') | |
| # set the locale to Portuguese | |
| I18n.locale = :br | |
| # Get the newest affiliate that we just create | |
| affiliate = Affiliate.last | |
| affiliate.update(name: 'O grande Hotel', description: 'Aqui vai um longo texto em português com a descrição do hotel') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment