Tried a partial override...same result.

Override works on the forms, validations FAILED!

ActionView::TemplateError (invalid utf8 byte: 'í') on line #17 of
vendor/plugins/active_scaffold/fro
ntends/default/views/create.rjs:

file:
_mfg_form_column.rhtml

<% scope ||= nil %>
<div id="mfg_div">
<dl>
  <dt><i>
    <label for="<%= "record_#{column.name}" %>"> <%= column.label %></
label>
  </i></dt>
  <dd>
    <%= collection_select(:record, :mfg, Org.find(:all,:conditions =>
[ "orgtype_id = ?", 2 ], :order => "name"), 'id', 'name', options =
{:prompt => "- select -"}) %>
  </dd>
</dl>
</div>





On Feb 5, 10:50 pm, coalex <[email protected]> wrote:
> I have a helper causing my validations to fail, with this message.
>
> ActionView::TemplateError (invalid utf8 byte: 'í') on line #17 of
> vendor/plugins/active_scaffold/frontends/default/views/create.rjs:
>
> The troubled helper...# Selects for orgs with type of manufacturer and
> sets selected for update form if set.
> ---
>  def mfg_form_column(record, input_name)
>   if @record.mfg_id
>   select :record, :mfg, option_filtered_by(2),:name =>
> input_name, :selected => @record.mfg.id
>   else
>   select :record, :mfg, option_filtered_by(2),:prefix => input_name
>   end
>
>   end
>
>   def option_filtered_by(value)
>    Org.find(:all,
>              :conditions => [ "orgtype_id = ?", value ],
>              :order => "name").collect{|l| [l.name, l.id]}
>   end
> ---
>
> Remove this helper code, validations work fine.
> why?
> env:
> Rails 1.2.6
> ruby 1.8.6 (2008-03-03 patchlevel 114) [x86_64-linux]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to