Thank you in advance for your help.
I am working on a simple version of Groupon’s (www.Groupon.com) “Get Deal by email”.
When you click on “Get Deal by email” on the top of the site you get simple form to fill out and get Groupon deals on you email.
My search is a little difference and I have it as a resource so I can store the email and user location in a Database for later user.
On my layout I properly to my other resources as needed and that works fine. But I want to have the layout “yield” for my Simple Email Request resource too so it is always at the top(hidden or shown by javascript).
I know this might not be the Rails way. Please let me know what you think.
Thank you for your help.
Here is some code:
Just to summarize, what I want to do is display a _form.html.erb view from a new action of a controller(simplealert) in my layout header along with whatever else it I am ing for in the body. Code sample bellow.
<header>here is my problem. I want to load a _form.html.erb from my Simple_alert new method. Of course I want it to save properly as well. This will be similar to the "Get Deal by mail" from groupon.com sometimes I hide and show it. But it is a resource with proper DB fields.
</header>
body>
<%= yield %> # Here I normally yield for whatever is the main user call. This works fine.
I’m not sure what exactly you’re looking for, but there is a project called Cells for Ruby on Rails, which allows you to have multiple controllers on a page, or as they put it, ‘partials on steroids’.
The website is: http://cells.rubyforge.org/