RailsCasts Pro episodes are now free!

Learn more or hide this

brain64bit's Profile

GitHub User: brain64bit

Comments by

Avatar

I'm trying to store my I18n using redis for example :

  • locale: en
  • key: intro.label.title
  • value: "Hello World"

but my key change to introlabeltitle even my controller log like :
Parameters: {"commit"=>"Submit", "authenticity_token"=>"ZYoK5MMixIz9hiN8keOd9OTkKo6dBYluATYoyQDbmrY=", "utf8"=>"?", "value"=>"Hello World", "locale"=>"en", "key"=>"intro.label.title"}

and inside the redis-cli my key change to "en.intro\x01label\x01title"

here is my initializer :

TRANSLATION_STORE = Redis.new
I18n.backend = I18n::Backend::Chain.new(I18n::Backend::KeyValue.new(TRANSLATION_STORE), I18n.backend)

and my controller

I18n.backend.store_translations(params[:locale], {params[:key] => params[:value]}, :escape => false)

Thank you and sorry for my bad english

Avatar

Hi all. this railscast is awesome. But i've question, how to push a message for specific client. For example in facebook, if somebody send me a message or tag my photo, that was notification only for me. Thanks