Hi,

I am new to ROR and learning it. In my controller I have an admins
record and I am passing that admin object to the admin's view page to
get the name of the admin. But when I try to access the name it is
showing error as  "undefined method `name' for :current_admin:Symbol"..
Please help..
Please find my code below

Sessions Controller

def create
  admin=Admin.find_by_email(params[:session][:email].downcase)
    if admin && admin.authenticate(params[:session][:password])
       redirect_to(admins_index_path(:current_admin=>admin))
     end
end

In view page of index_admin

<%="Hi"%><%=params[:current_admin.name]%>

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to