Henrik,
This isn''t the rails mailing list, but is the rails spinoff list
mainly for the scriptaculous library.
Please direct your question to the rails list instead.
Thanks
On 10/15/05, Henrik Orm?sen <henrik.ormasen@sos-rasisme.no>
wrote:> Newbie question:
>
> From a _form.rhtml file I have:
> <%= render(:partial => ''item'', :collection =>
@items) %>
>
> In _item.rhtml I have:
> <% @tullt = h(item.body) %>
> <%= @itemdb = Group.find(:all,
> :conditions => "id =
''#{@tullt}''").map {|u| [u.name] }
> %>
> <%= @tullt %
>
> I think it would be better to put this code in a controller for this
> partial. I made the following item_controller.rb file for this:
>
> class ItemController < ApplicationController
> def index
> @tullt = h(item.body)
> @itemdb = Group.find(:all,
> :conditions => "id =
''#{@tullt}''").map {|u|
> [u.name] }
> end
> end
>
> But this doesn''t work (I guess for som obvious reason, I just
haven''t
> the knowledge of).
>
> - Henrik
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>