Looking on ActiveScaffold source I found this method in vendor/plugins/
active_scaffold/lib/active_scaffold/data_structures/column.rb:

    def description
      @description.is_a?(Symbol) ? as_(@description, {:scope =>
[:activerecord, :attributes,
active_record_class.to_s.underscore.to_sym]}) : as_(@description) if
@description
    end

That works using "config.columns[:column].description
= :column_description" but this is not comfortable because I need to
write it for all column which I need a description using a name
like :name_description.

I written a small "plugin" with around 3 lines which change this
behavior.
See here: http://pastie.org/private/ptkhq6vszabqq5crfvt6a

Now it's full automatic. I write the description in the locale file
(example in pastie link) and it's shown on ActiveScaffold. I think
this works more comfortable than the actual form.

Can ActiveScaffold change this behavior if ActiveScaffold users liked
that?


Thanks

On 1 jul, 19:22, "G. Sobrinho" <[email protected]> wrote:
> Hello,
>
> I'm working on new project using ActiveScaffold and now I need to
> internationalize the column descriptions.
> I think the best form is create a method named human_description (ie:
> Category.human_description :name) and create a method which overwrite the
> ActiveScaffold to show it automatically if have.
>
> What you think?
>
> Thanks
>
> --
> Regards,
>
> Gabriel Sobrinho
> E-mail: [email protected]
> Phone: +55 31 8775 8378
>
> Don't print this e-mail. The nature is thankful and your money also.
--~--~---------~--~----~------------~-------~--~----~
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