title: ActionView::Template::Error undefined local variable or method `href'
body: <p>Why my rails app raises error for any operation that needs routing ?</p>
  
  <p>Here is what I get:</p>
  
  <pre><code>ActionView::Template::Error (undefined local variable or method `href' for #&lt;#&lt;Class:0xaba4f00&gt;:0xafd636c&gt;):
  </code></pre>
  
  <p>for any <code>link_to</code> , what could be wrong ?, I reverted routes.rb to a good version, but, I still have the problem ..</p>
  
  <p>Any idea ?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is my routes.rb</p>
  
  <pre><code>DCACLab2::Application.routes.draw do
  
    resources :authentications
  
    resources :class_rooms_member_ships
  
    resources :lessons
  
    resources :subscriptions
    resources :plans
  
  
    resources :schools
  
  
  
  
    #match '/:id' =&gt; 'class_rooms_member_ships#new', :constraints =&gt; { :id =&gt; /\d+/ }
  
    devise_for :users, :controllers =&gt; {  :registrations =&gt; "users/registrations" } # :sessions =&gt; "users/sessions",
  
  
    resources :teacher_profiles do
      get :autocomplete_school_name, :on =&gt; :collection
    end
    resources :experiments
    get 'experiments/:id/info_edit' =&gt; 'experiments#info_edit',:constraints =&gt; { :id =&gt; /\d+/ }
  
    Rails.application.routes.draw do
  
  
      resources :teacher_profiles
  
      resources :schools
  
      filter :locale, :pagination, :uuid
    end
  
  
    match 'lang' =&gt; 'home#set_lang'
  
    match 'free_trial' =&gt; 'home#free_trial'
    match 'home' =&gt; 'home#home'
    match 'features' =&gt; 'home#features'
    match 'pricing' =&gt; 'home#pricing'
  
    match 'contact' =&gt; 'contact#new', :as =&gt; 'contact', :via =&gt; :get
    match 'contact' =&gt; 'contact#create', :as =&gt; 'contact', :via =&gt; :post
  
    match 'dashboard' =&gt; 'experiments#index'
    match 'complete_order' =&gt; 'home#complete_order'
    post 'notifications' =&gt; 'subscriptions#instant_payment_notification'
    get 'paypal/checkout', to: 'subscriptions#paypal_checkout'
    get 'paypal/checkout/post/form', to: 'subscriptions#paypal_checkout_post_form'
  
    #match 'lab' =&gt; 'home#lab'
    match 'lab' =&gt; 'experiments#lab'
  
  
    match 'trial_account' =&gt; 'home#trial_account'
    match 'student_account' =&gt; 'home#student_account'
    match 'school_account' =&gt; 'home#school_account'
  
  
    match 'create_account' =&gt; 'home#registration_entrance'
    match 'users/create_account' =&gt; 'home#registration_entrance'
    match 'registration_redirect' =&gt; 'home#registration_redirect', :via=&gt;[:post]
    # You can have the root of your site routed with "root"
    # just remember to delete public/index.html.
    root :to =&gt; 'home#home'
  
    match '/auth/facebook/logout' =&gt; 'authentications#facebook_logout', :as =&gt; :facebook_logout
    #match '/auth/facebook/callback' =&gt; 'authentications#create'
    match '/auth/:provider/callback' =&gt; 'authentications#create'
    match '/auth/failure' =&gt; 'authentications#failure'
  
    match '/fb_channel', :controller=&gt;'authentications', :action=&gt;'fb_channel'
  
  
  end
  </code></pre>
  
  <p>as for link_to code, its just normal ..</p>
  
  <pre><code>%li{:class=&gt;"#{action_name == action ? 'active':''}"}
                   = link_to :controller =&gt; '/home', :action =&gt; action do
                     = t(action)
  </code></pre>