Thank you for applying this "plugin". Wiki need's update about that, I'm
without time to change that.

If you can, update wiki also.



Thank you again Sergio

2009/7/2 Sergio Cambra .:: entreCables S.L. ::. <[email protected]>

>
> On Jueves, 2 de Julio de 2009 01:35:05 G. Sobrinho escribió:
> > 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?
>
> I have changed behavior with your suggestion, but I have kept attr_writer
> :description, and when description is set, is returned without translation,
> so
> people who don't use I18n can set description.
>
> Thanks
>
> >
> >
> > 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.
> >
> >
> --
> Sergio Cambra .:: entreCables S.L. ::.
> Mariana Pineda 23, 50.018 Zaragoza
> T) 902 021 404 F) 976 52 98 07 E) [email protected]
>
>
> >
>


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