default_url_options not called (Rails 4)

Viewed 173

I've set default_url_options in my ApplicationController class to add a default year parameter in the url.

 class ApplicationController < ActionController::Base
   def default_url_options
    {locale: I18n.locale, year: session[:current_year]}
   end
 end

I used path helper in views to make links to controllers and action.

<%= link_to t('.people'), people_path %>

It works fine in development and production on my local computer but in production on the server the default_url_options is never called. Why ?

Edit: In development is working fine. Then, the problem is with the production. It'm going to search in this direction.

1 Answers
Related