Giving link frm one controller to another

hi all,
well i am new to rails
just install it and am trying to learn it

heres the problem
i have 2 two controller(cntrl1 and cntrl2) corrosponding to 2 table(tbl1
and tbl2) now in the vews of cntrls1(ie show page )i want to give link
to the create page of cntrl2(tht new page for 2nd table )
but i dont know how to do it

pls help me out

Prashant wrote:

hi all,
well i am new to rails
just install it and am trying to learn it

heres the problem
i have 2 two controller(cntrl1 and cntrl2) corrosponding to 2 table(tbl1
and tbl2) now in the vews of cntrls1(ie show page )i want to give link
to the create page of cntrl2(tht new page for 2nd table )
but i dont know how to do it

pls help me out

if i understand right, you just want:

link_to ‘show’, :controller => :cntrl2, :action => :show

ya i did tht
but its giving an error undefine method

Prashant wrote:

ya i did tht
but its giving an error undefine method

And:

link_to ‘show’, :controller => ‘cntrl2’ :action => ‘show’

or

link_to ‘show’, :controller => :cntrl2, :action => :show