On 23 April 2011 13:18, amrit pal pathak <[email protected]> wrote:
>
> I generated a simple controller using "script/generate controller form
> myfun".Then edited a /app/view/form/myfun.html.erb  simply as
>  <h1>Hello</h1>
> <%=link_to 'Submit'%>
>
>                                               I created a another
> controller using "script/generate controller click fun".Edited the app/
> view/click/fun.html.erb to hold a welcome message as
>
> <h1>Welcome</h1>
>                                                      I want click on
> submit should show this message,but dont know how to connect these two
> controllers.using rails .I am using rails 3.0.7.

It is important to distinguish between the three components Model View
Controller of MVC design.  If you are not clear on these then some
googling and reading might be worthwhile.  I presume that what you
actually want to do is link to a controller action from the _view_ of
another controller.  To do that simply put use link_to to link to the
the controller/action that you want.

I think I suggested in a reply to one of your earlier questions (if it
was you, apologies if not) that you worked right through some
tutorials, the free to use online one at railstutorial.org is very
good.  Once you have done that then these very basic questions that
you are asking will not need to be asked.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to