In the else part you will have to render something like <dl><dd><span
class="<%=
column.name %>-input"></span></dd></dl>
Because render_field action (action called when you change platform_version)
gets the tag with that class, and then gets the dl parent and replace it with
a new one
On Miércoles, 13 de junio de 2012 23:31:44 Jonas Bang escribió:
> I'm trying to solve the same issue.
>
> This is what I almost got to work, but it only works once!! Meaning, in a
> new create form the 'prefix' column is shown, and if I select a
> 'platform_version' with 'prefix_required' false, then the 'prefix' column
> will be hidden. But, it does not bring back the 'prefix' column if I change
> the 'platform_version' to one with 'prefix_required' true. However, with
> traces in the code I can see that it runs the code and ends up in the 'if'
> section, but it does not bring back the column.
>
> Could it be that I need to re-render something?
>
> *products_controller.rb*
> config.columns[:platform_version].update_columns = [ :prefix ]
>
> *_prefix_form_column.html.erb*