On Miércoles, 17 de Febrero de 2010 20:01:33 Pusillanimous Coward escribió:
> Two issues with text field helpers:
>
> 1. Create a helper like
>
>   def data_column(record)
>     text_area :record, :data, :cols => 75, :rows => 25, :disabled =>
> 'disabled'
>   end
>
> The data in the text box will be decorated with br tags.
>
> 2. With the latest download, the helper above will not be called.
>
> My work-around:
>
> In active_scaffold/lib/active_scaffold/helpers/show_column_helpers.rb,
> make the following change:
>
> Replace
>
>       def active_scaffold_show_text(column, record)
>         simple_format(get_column_value(record, column))
>       end
>
> with
>
>       def active_scaffold_show_text(column, record)
>         if override_show_column_ui?(column.column.type)
>           get_column_value(record, column)
>         else
>           simple_format(clean_column_value(record.send(column.name)))
>         end
>       end

It has no sense. active_scaffold_show_text is called when 
override_show_column_ui?(column.column.type) returns true, so the if statement 
always will be true and it's the same as:
def active_scaffold_show_text(column, record)
  get_column_value(record, column)
end

And that it's the same as remove that method.

If you want to override the column in show view, use a show override:
def data_show_column(record)


-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

-- 
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