Hi all, I’m new to RoR
I finally got a RoR environment working on my PC with instantrails 2.0.
Here is my problem.
I created a database with a “Users” table.
It’s structure is the following :
Name, Surnmame, City, age…
The table containing the Users was succesfully scafolded and I have the
adress “localhost:3000/users” running with all the CRUD functions !
now I want to add a link at the botom of the index page allowing me to
filter the users living in Paris (and ultimately, a textbox where I can
put in any search criteria). But getting the filter for the Paris Users
would already end a huge headache.
I added at the bottom of the index page a “Paris” link after the
prebuilt “new user” link.
the bottom of my index page looks like this :
<%= link_to ‘New user’, new_user_path %>
<%= link_to ‘paris’,{:controller => “users”, :action => “paris” }%>
I added the “Paris” control in “users_controller.rb” wich I left empty
but I get the same error no matter what I put in it…
def paris
end
Everytime I click on the link I get the following error :
"ActiveRecord::RecordNotFound in UsersController#show
Couldn’t find User with ID=paris"
I am unable to add new controls as I always get “Couldn’t find User with
ID=paris” no matter what I put in the Paris action.
There i probably some RoR concept I didn’t get right…
thanx for your help !