Right, the repeat is changing the context.   Try this:

<!-- radio for a belongs_to -->
<def tag="radio-one" attrs="options,limit">
<% saved_this = this
    conditions =
ActiveRecord::Associations::BelongsToAssociation.new(this_parent,
this_field_reflection).conditions if options.nil?
    options ||= this_field_reflection.klass.all(:conditions =>
conditions, :limit => limit).select {|x| can_view?(x)}
    name = param_name_for_this(true)
%>
   <repeat with="&options">
     <input type="radio" name="&name"
value="&this.id" checked="&saved_this==this"/><view/><br/>
   </repeat>
</def>

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to