diff options
| author | Michel Etienne | 2015-01-08 17:12:27 +0100 | 
|---|---|---|
| committer | Michel Etienne | 2015-01-08 17:12:27 +0100 | 
| commit | 8a4bb1eb66da1140375071ea153b83946b07aa71 (patch) | |
| tree | f13dc027df0e31406a745e6c592e1ca536b36311 | |
| parent | d31369e508a37a46e57146ef9157b0d140c3b073 (diff) | |
| download | chouette-core-8a4bb1eb66da1140375071ea153b83946b07aa71.tar.bz2 | |
manage unauthenticated_root
| -rw-r--r-- | app/helpers/users_helper.rb | 4 | ||||
| -rw-r--r-- | app/views/devise/mailer/invitation_instructions.fr.html.erb | 2 | ||||
| -rw-r--r-- | config/deploy/production.rb | 4 | ||||
| -rw-r--r-- | config/deploy/unstable.rb | 4 | ||||
| -rw-r--r-- | config/environments/development.rb | 9 | ||||
| -rw-r--r-- | config/routes.rb | 4 | 
6 files changed, 14 insertions, 13 deletions
| diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 0ddea8356..a4347bd18 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -5,10 +5,10 @@ module UsersHelper    end    def user_default_avatar -    return "#{root_url}#{image_path('icons/user.png')}" if Rails.application.config.relative_url_root.blank? +    return "#{authenticated_root_url}#{image_path('icons/user.png')}" if Rails.application.config.relative_url_root.blank?      relative_url_root = Rails.application.config.relative_url_root.gsub( /\//, '') -    "#{root_url}#{image_path('icons/user.png')}". +    "#{authenticated_root_url}#{image_path('icons/user.png')}".        sub( Regexp.new("/#{relative_url_root}/#{relative_url_root}/"), "/#{relative_url_root}/").        sub( Regexp.new("/#{relative_url_root}//#{relative_url_root}/"), "/#{relative_url_root}/")    end diff --git a/app/views/devise/mailer/invitation_instructions.fr.html.erb b/app/views/devise/mailer/invitation_instructions.fr.html.erb index 7ef4e6c99..c932763f2 100644 --- a/app/views/devise/mailer/invitation_instructions.fr.html.erb +++ b/app/views/devise/mailer/invitation_instructions.fr.html.erb @@ -1,6 +1,6 @@  <p>Bonjour <%= @resource.email %>,</p> -<p>Ce message est une invitation pour accéder à <%= link_to nil, root_url %>, vous pouvez l'accepter en cliquant sur le lien suivant :</p> +<p>Ce message est une invitation pour accéder à <%= link_to nil, unauthenticated_root_url %>, vous pouvez l'accepter en cliquant sur le lien suivant :</p>  <p><%= link_to "Accepter l'invitation", accept_invitation_url(@resource, :invitation_token => @resource.invitation_token) %></p> diff --git a/config/deploy/production.rb b/config/deploy/production.rb index 57d36de2d..976a5d9a3 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -1,3 +1,3 @@  server "chouette.cityway.fr", :app, :web, :db, :primary => true -set :branch, "V2_5" -set :gui_cmd, "2.5.1"
\ No newline at end of file +set :branch, "V2_5_1" +set :gui_cmd, "2.5.1" diff --git a/config/deploy/unstable.rb b/config/deploy/unstable.rb index e8fe08e75..b5e60b53d 100644 --- a/config/deploy/unstable.rb +++ b/config/deploy/unstable.rb @@ -1,3 +1,3 @@  server "chouette-p.aix.cityway.fr", :app, :web, :db, :primary => true -set :branch, "V2_5" -set :gui_cmd, "2.5.1"
\ No newline at end of file +set :branch, "V2_5_1" +set :gui_cmd, "2.5.1" diff --git a/config/environments/development.rb b/config/environments/development.rb index 0d33ac03c..3d7819639 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -69,10 +69,11 @@ ChouetteIhm::Application.configure do    # Configure the e-mail address which will be shown in Devise::Maile    config.mailer_sender = "appli@chouette.mobi" -  ActionMailer::Base.smtp_settings = { -    :address        => "smtp.samle.com", -    :domain         => "sample.com" -  } + config.action_mailer.delivery_method = :sendmail  +  # change to true to allow email to be sent during development +  config.action_mailer.perform_deliveries = true +  config.action_mailer.raise_delivery_errors = true +  config.action_mailer.default :charset => "utf-8"    # api key to geoportail IGN (development key 3 month validity)    # config.geoportail_api_key = "f1t6wihbh98njlbaf5cuzxy4" diff --git a/config/routes.rb b/config/routes.rb index 530e17409..6879a2191 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -7,11 +7,11 @@ ChouetteIhm::Application.routes.draw do    devise_scope :user do      authenticated :user do -      root :to => 'referentials#index' +      root :to => 'referentials#index', as: :authenticated_root      end      unauthenticated do -      root :to => 'devise/sessions#new' +      root :to => 'devise/sessions#new', as: :unauthenticated_root      end    end | 
