Alan Red wrote:
Im starting to get tired of putting all the information on my layouts
for links to my pages. I was wondering if ruby on rails had an include
function like php where I could put the links in one file and put one
line on each layout.
Also, if your layouts are the same, or very similar, then you can just
use a single layout (app/views/layouts/application.html.erb) and allow
for any differences from there. If you use this approach, then you will
have to remove the individual controller layouts as they will override
the application default one.
I would also like to know how you get ruby to refresh a page using a
button if anyone knows.
The user already has a refresh page button on their browser, however if
you really need this, then you can add something like this, say to your
<%= button_to "Refresh", :controller => controller.controller_name,
:action => controller.action_name %>
However I haven't checked what happens to your params through this call,
so you may need to do something clever with them.