[Nitro] Q about helper :form
Alexander Lazic
al-nitrogen at none.at
Sat Aug 5 03:48:24 EDT 2006
On Sam 05.08.2006 09:03, Alexander Lazic wrote:
>On Sam 05.08.2006 14:07, Michael Fellinger wrote:
>>yes, please require 'part/admin' after the other stuff... that should
>>fix it :)
>
>Nope.
Well i think i have solved the error but i don't know if it's the
*right* way.
I have add
---
require 'nitro/helper/form'
class Hello
include Nitro::FormHelper
.
.
.
---
into the controller.rb and now the form is build ;-)
The next pitfall is that the action is now:
---
<form action="/save_user" method="post"><input type="hidden" name="oid"
value="1" /
---
here the complete list.xhtml
---
<html>
<h1> User List </h1>
<ul unless="@users.empty?">
<li for="user in @users"> #{user} (<a href="delete/#{user.oid}">delete</a>)</li>
</ul>
<span if="@users.empty?"> No users </span>
<hr/>
#{form_for User.find_by_name('gsmox')}
</html>
---
i think i need a 'def save_user(....)' in controller.rb ;-), thats my
next step ;-)
regards
Alex
More information about the Nitro-general
mailing list