On Mar 3, 2012, at 2:36 PM, Fresh Mix wrote:
> Walter Davis wrote in post #1049966:
>> On Mar 3, 2012, at 12:50 PM, Fresh Mix wrote:
>>
>>> Why this doesn't work?
>>>
>>> <%= link_to 'in english', :locale => 'en' if I18n.locale != 'en' %>
>>>
>>> And how to make it work?
>>
>> The answer to both is parentheses.
>>
>> Walter
>
> <%= link_to('in english', :locale => 'en') if (I18n.locale != 'en') %> ?
>
> Doesn't work!
Then please define doesn't work. The former would throw a concatenation error.
The new version does exactly what that you don't expect? Another hint -- what
is the precise value of the locale (value AND format)?
Walter
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en.