[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 :)

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
  <h1> User List </h1>

  <ul unless="@users.empty?">
    <li for="user in @users"> #{user} (<a href="delete/#{user.oid}">delete</a>)</li>
    <span if="@users.empty?"> No users </span>


  #{form_for User.find_by_name('gsmox')}

i think i need a 'def save_user(....)' in controller.rb ;-), thats my
next step ;-)



More information about the Nitro-general mailing list