[Rails] ActiveRecordHelper

Tobias Luetke tobias.luetke at gmail.com
Tue Dec 28 15:37:05 GMT 2004


Hieraki source should have some good examples : 

http://dev.hieraki.org/trac.cgi/file/trunk/app/views/account/signup.rhtml
http://dev.hieraki.org/trac.cgi/file/trunk/app/views/page/new.rhtml
http://dev.hieraki.org/trac.cgi/file/trunk/app/views/chapter/new.rhtml


The beauty about the form helpers is that if the field doesn't
validate they will be wrapped in a fieldWithErrors div. So with a bit
CSS you can easily give them a red highlight or add a little icon.


On Tue, 28 Dec 2004 15:11:22 +0100, Roeland Moors
<roelandmoors at telenet.be> wrote:
> I have an edit form created with this:
> <%= form 'address', :action => 'update' %>
> 
> But now I want a more customized form, I need to change the label
> names.
> Do I have to type this stuff manualy:
> 
> <form action="/address/update" method="post">
> <input id="address_id" name="address[id]" type="hidden"
>     value="<%= @address.id %>" />
> ...
> <input type="submit" value="Update" />
> </form>
> 
> Or is there a helper function for this?
> Is there maybe also a helper function for creating labels?
> 
> Thanks,
> 
> Roeland
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
> 


-- 
Tobi
http://blog.leetsoft.com


More information about the Rails mailing list