Params Help to Pass variables from URL


Hi guys,

I’m new to ruby on rails and am realy quite having a problem with
passing values. I created a test folder and have 3 files:

  1. Main.rhtml

<%= render_component(:controller => “test”, :action => “pass”) %>

  1. Pass.rhtml


  1. Controller.rb

class TestController < ApplicationController

def pass

@test = “<a href=“main?name=123”>Testing!”
@passed = params[:name]
#flash[:notice] = ‘456’
flash[:notice] = @passed



Well, as much as I get the url properly to simulate the passing of
variables: to

I can’t seem to get the value of name rendered to my page which is
suppose to be 123.

Would really appreciate your help!

Thanks in advance!