Skip to content

Ethelo/citizen_budget_model

Repository files navigation

Citizen Budget: Model

Gem Version Build Status Dependency Status Coverage Status Code Climate

Usage

In Gemfile:

gem 'citizen_budget_model'

In config/routes.rb:

mount CitizenBudgetModel::Engine => '/'

In config/environments/production.rb:

config.action_mailer.default_url_options = {host: ENV['ACTION_MAILER_HOST']}

If you are using the engine's admin views:

gem 'jquery-rails'

Internationalization

Set your locales in config/application.rb, for example:

config.i18n.available_locales = ['en-CA', 'fr-CA']
config.i18n.default_locale = 'en-CA'
config.i18n.fallbacks = {'en-CA' => ['en-CA', :en, 'fr-CA', :fr], 'fr-CA' => ['fr-CA', :fr, 'en-CA', :en]}
config.i18n.enforce_available_locales = false

To fully support multiple languages, in Gemfile:

gem 'gettext'
gem 'rails-i18n', '~> 4.0.0'
gem 'devise-i18n', '~> 0.10.4'

You can then add translations to the Redis backend:

bundle exec rake citizen_budget_model:translations CONFIRM=true

Deployment

heroku apps:create
heroku config:set SECRET_KEY_BASE=`bundle exec rake secret`
heroku config:set ACTION_MAILER_HOST=www.example.com
heroku config:set DEVISE_MAILER_SENDER=noreply@example.com

Testing

bundle exec rake db:drop RAILS_ENV=test
bundle exec rake db:create RAILS_ENV=test
bundle exec rake db:migrate RAILS_ENV=test
bundle exec rake
bundle exec guard

Copyright (c) 2014 Open North Inc., released under the MIT license

About

The Citizen Budget budget simulation model

Resources

License

Stars

Watchers

Forks

Packages

No packages published