On Miércoles, 28 de Septiembre de 2011 14:06:47 Slava Mikerin escribió:
> I am not sure I understand what to do.. I tried
> 
>  en:
>    active_scaffold:
>       symbol: "Symbol %{show_model.type}"
> 
> that did not work. How do I get an attribute from the model to show up
> interpolated?

It's not possible, column labels don't interpolate anything.
Usually you should add a key like activerecord.attributes.model.column, then 
you won't need any interpolation

en:
  activerecord:
    attributes:
      model:
        symbol: "Symbol model"

Also, you can set a symbol in the column, without interpolation too:
config.columns[:symbol].label = :model_symbol
en:
  active_scaffold:
    symbol: "Symbol model"


If you want to use interpolation, you will have to override label method of 
ActiveScaffold::DataStructures::Column class

> 
> On Wed, Sep 28, 2011 at 2:02 AM, Sergio Cambra .:: entreCables S.L.
> 
> ::. <[email protected]> wrote:
> > On Martes, 27 de Septiembre de 2011 12:38:40 Slava Mikerin escribió:
> >> active_scaffold :terms do |config|
> >>     config.columns = [
> >> 
> >>         :symbol,
> >> 
> >> ...
> >> ]
> >> end
> > 
> > Column labels have no model interpolation, there are some strings with
> > that interpolation like create_model, create_another, show_model,
> > update_model and others.
> > 
> >> On Tue, Sep 27, 2011 at 2:32 AM, Sergio Cambra .:: entreCables S.L.
> >> 
> >> ::. <[email protected]> wrote:
> >> > On Martes, 27 de Septiembre de 2011 11:15:59 Slava Mikerin escribió:
> >> >> There is no view code. It's an active scaffold controller.
> >> > 
> >> > Where are you using symbol in the controller?
> >> > 
> >> >> On Tue, Sep 27, 2011 at 1:22 AM, Sergio Cambra .:: entreCables S.L.
> >> >> 
> >> >> ::. <[email protected]> wrote:
> >> >> > On Martes, 27 de Septiembre de 2011 08:49:43 slava escribió:
> >> >> >> Hello,
> >> >> >> Having a bit of a difficulty with localization.
> >> >> >> 
> >> >> >> en:
> >> >> >>   active_scaffold:
> >> >> >>     symbol: "Symbol %{model}"
> >> >> >> 
> >> >> >> gives me on the page
> >> >> >> "Symbol %{model}"
> >> >> >> 
> >> >> >> instead of the interpolated value. What am I missing? Thanks.
> >> >> > 
> >> >> > What is the code in the view?
> >> >> > 
> >> >> > --
> >> >> > 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.
> >> > 
> >> > --
> >> > 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.
> > 
> > --
> > 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.

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