Hi @mde, it's nice to talk to you again. I have question about the params variable. What exactly is it's use? Is it the way to pass variables between the controllers and the views? Any reply is much appreciated.
Did you get this figured out? The params property on the controller is a combination of things parsed out of the route (e.g., an ID for a resource-based route), the URL-params, and params from a form POST or PUT.
Well, to be honest I don't think so. My real question is, how do variables get sent between the views and corresponding controllers? I would love to know because I have been banging my head against a wall about this. Thanks.
Any variables you want in your views need to be explicitly passed when you render them from a controller-action.
Any key in the object-literal passed to the respond call is available as a local variable in your view. Passing 'params' is just an example of something you can pass in to use in the view. You can use one of the boilerplate views generated by geddy resource, and watch them spit out anything you add to the querystring, because they're just looping over the params passed into the view.
Hope that helps.