ruby - Why do I get "Uninitialized Constant" from Rails? -


i created route:

user_currency    /user/currency/:currency(.:format)        user#currency 

this user controller:

class userscontroller < applicationcontroller  require 'will_paginate/array'  require 'gdata'        before_filter :ensure_user_friendly_url, :only => [:show, :following, :followers, :friends, :designers] before_filter :check_if_signed_in, :only => :signup 

and controller route:

def currency session[:currency] = params[:currency] redirect_to :back end 

i getting error:

uninitialized constant usercontroller 

the error occurs here:

- currency_values.each |currency|     %li        = link_to "#{currency.country}", user_currency_url(currency.id) 

i passing currency_id currency.

in route declaration refer controller name incorrectly. should be:

user_currency    /user/currency/:currency(.:format)        users#currency 

basically controller userscontroller not usercontroller.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -