translation syntax t(:symbol) vs (t 'string')

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

translation syntax t(:symbol) vs (t 'string')

fugee ohu
When I try to use the t(:symbol) syntax I always get a devise translation missing error and I have to change it to (t 'string') Why is that?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b58454ba-1740-471f-8820-cb4a7ca13bf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: translation syntax t(:symbol) vs (t 'string')

Parampreet Singh

Hi,
Symbols in Ruby are immutable unlike strings. And that's why you can't change them.


On 16-Sep-2018 8:21 AM, "fugee ohu" <[hidden email]> wrote:
When I try to use the t(:symbol) syntax I always get a devise translation missing error and I have to change it to (t 'string') Why is that?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b58454ba-1740-471f-8820-cb4a7ca13bf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAGb%2BFWBTTFkBkKVaLp2jDibgWjL3KRpZSMPDUdVT5GGTMcKdFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.