Rails 4 : Routes match, id not found -


I am currently writing my first app with Rail 4, after the tutorial. After finishing almost the user part (controller, scene and model), I wanted to match the profile / profile like "user # show" with one path, I did this:

  Ressources: user 'profile' = & gt; The problem is in my controller:  
  def show = user = user.fund (params [: id]) and << / P>       

I have read the guide and I thought that Paramams were passed but it does not seem like this. It would be a stupid mistake, but I do not know.

Thank you!

You must specify the ID placeholder in the URL like this:

'Profile /: id' = & gt; You can now call URL such as

"profile / 12"

. And

parameter [: id]

Check the docs on routing here

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -