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

10 views
Skip to first unread message

fugee ohu

unread,
Sep 15, 2018, 10:51:11 PM9/15/18
to Ruby on Rails: Talk
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?

Parampreet Singh

unread,
Sep 17, 2018, 10:48:58 AM9/17/18
to rubyonra...@googlegroups.com

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" <fuge...@gmail.com> 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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
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 all
Reply to author
Forward
0 new messages