From befb5afa0ffa88ebced3b9db8f69091f0dcaee3b Mon Sep 17 00:00:00 2001 From: Luc Donnet Date: Mon, 13 Feb 2012 11:22:42 +0100 Subject: Add referential model and gem apartment --- config/application.rb | 5 +++++ config/initializers/apartment.rb | 4 ++++ config/locales/referentials.yml | 21 +++++++++++++++++++++ config/routes.rb | 3 ++- 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 config/initializers/apartment.rb create mode 100644 config/locales/referentials.yml (limited to 'config') diff --git a/config/application.rb b/config/application.rb index 07b94ace7..8c7e93062 100644 --- a/config/application.rb +++ b/config/application.rb @@ -11,6 +11,11 @@ end module ChouetteIhm class Application < Rails::Application + + config.generators do |g| + g.test_framework :rspec + end + # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. diff --git a/config/initializers/apartment.rb b/config/initializers/apartment.rb new file mode 100644 index 000000000..d51724a04 --- /dev/null +++ b/config/initializers/apartment.rb @@ -0,0 +1,4 @@ +Apartment.configure do |config| + # set your options (described below) here + config.excluded_models = ["Referential"] # these models will not be multi-tenanted, but remain in the global (public) namespace +end \ No newline at end of file diff --git a/config/locales/referentials.yml b/config/locales/referentials.yml new file mode 100644 index 000000000..624dba689 --- /dev/null +++ b/config/locales/referentials.yml @@ -0,0 +1,21 @@ +fr: + referentials: + edit: + title: "Modifier le référentiel" + show: + title: Référentiel + new: + title: Créer une nouveau référentiel + submit: "Créer un référentiel" + actions: + new: Ajouter une référentiel + destroy_confirm: "Etes vous sûr de vouloir supprimer le référentiel ?" + destroy: Supprimer + edit: Modifier + activerecord: + models: + referential: Référentiel + attributes: + referential: + name: Nom + slug: Code diff --git a/config/routes.rb b/config/routes.rb index 53fcaae98..81dd47560 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -13,6 +13,7 @@ ChouetteIhm::Application.routes.draw do # Sample resource route (maps HTTP verbs to controller actions automatically): # resources :products resources :lines + resources :referentials # Sample resource route with options: # resources :products do @@ -49,7 +50,7 @@ ChouetteIhm::Application.routes.draw do # You can have the root of your site routed with "root" # just remember to delete public/index.html. - root :to => 'welcome#index' + root :to => 'lines#index' # See how all your routes lay out with "rake routes" -- cgit v1.2.3