There should be a simple Helper for generating the URL for changing a Translation.
For example the additive way...
# app/helpers/application_helper.rb
require 'riddick/helpers'
module ApplicationHelper
include Riddick::Helpers
end
# app/views/layouts/application.html.erb
<button><%= riddick_t '.button' %></button>
Or the destructive way...
# config/initializers/riddick_i18n.rb
require 'riddick/helpers'
I18n.extend Riddick::Helpers
# app/views/layouts/application.html.erb
<button><%= t '.button', riddick: true %></button>
Both ways should generate following:
<button>
My Button Label
<span data-riddick-url="/admin/riddick/my?k=en.layouts.application.button"></span>
</button>
There should be a simple Helper for generating the URL for changing a Translation.
For example the additive way...
Or the destructive way...
Both ways should generate following: