Hema Gonaboina
2008-Aug-20 15:15 UTC
Rendering another action instead of the specified action
In my view i am using as that is in the new.rhtml <%= link_to "Show All Elections",:controller => "elections",:action => "display" %> And in the controller i am using the definition as def display @elections = Election.find(:all) end I have the display.rhtml page as <% for h_edi_employee_election in @h_edi_employee_elections %> <%= link_to %Q{#{election.Employee_Id}}, :action => ''show'', :id => election %> <% end %> But it is not rendering the display action Show is the another action which display only the particular employee... i need to display the list so i used the display action But when i click the link it is throwing the exception NoMethodError in Elections#show Showing elections/_form.rhtml where line #104 raised: why it is rendering the action show? and going for the _form.rhtml page.. can anyone please help me? and i also kept the validations in my model but they are not effecting when i am creating the employee.Please Help me regarding these issues... -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---