+1 on Colin's response
On Monday, November 19, 2012 11:17:40 AM UTC-7, Ruby-Forum.com User wrote:
>
> So I've just dipped into Rails and I'm completely lost ...
> I have a very simple website. There are 2 layouts, application and
> welcome.
>
> The route begins at the welcome layout.
>
> The "main" controller is connected to the "welcome" layout, and has one
> method, so this method's view gets inserted at the yield block. It
> inserts an image that when you click it, brings you to a new page. This
> new page has a new layout "application". The controller "beers" is
> connected to this layout and has three methods, beers1, beers2, food.
>
>
> Below is the view that gets inserted in "welcome" layout:
> **************************************************************************
> <p align="center"><font size="24"><%= @message %></font></p>
>
> <p align="center"><font size="20">Last Summer, I travelled through
> Europe on a beer tasting extravaganza!</font></p>
>
> <p align="center"> <%= link_to image_tag("europe.jpg"), :height =>
> "25%", :width => "25%", :controller => "beers", :action => "beer1",
> %></p>
>
> <p align="center"><font size="8">[ Click the frothy beverage above ...
> ]</font></p>
>
> ***************************************************************************
>
>
>
> Below is the view for "beers1" method.
>
> **************************************************************************
>
> <p align="center"><%= link_to image_tag "cerna.jpg", :height => "25%",
> :width => "25%", :controller => "beers", :action => "beers2" %></p>
>
> <p align="center"><font size="18"><%= @message1 %></font></p>
>
> <p align="center"><font size="8">[ Click the image to see more beer ]
> </font></p>
>
> **************************************************************************
>
>
> I would like also to be able to click on this image and go to another
> new page. This new page is simply the "application" layout again but
> with the view "beers2" inserted at the yield block instead...
>
> How do I do this?
>
> I've tried the above but it just won't work, the page won't change!
>
> --
> Posted via http://www.ruby-forum.com/.
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/mPLgg1kMCwgJ.
For more options, visit https://groups.google.com/groups/opt_out.