Questions tagged [mobility]

Mobility is a pluggable translation framework for Ruby.

Mobility is a ruby gem for storing and retrieving translations as attributes on a class. Storage of translations is handled by customizable "backends" which encapsulate different storage strategies, including translatable columns and model translation tables, as well as database-specific storage solutions such as jsonb and Hstore (for PostgreSQL).

85 questions
0
votes
1 answer

Any chance of expanding data types for mobility

I love the gem and how it works, I was just wondering if there was any existing or planned functionality to specify data types other than text and string for the translations (stored in mobility_[type]_translations)?
dropbeardan
  • 1,080
  • 10
  • 11
0
votes
1 answer

Sorting a result defined by remote parameters

i have this index action: def index limit = params[:limit] page = params[:page] sort = params[:sort].split(',') @term = nil if params[:search] @term = params[:search] @lessons = policy_scope(Lesson).search(@term) …
Andreas
  • 21
  • 2
  • 4
0
votes
1 answer

Maximum Mobility Speed in OMNET++

I am trying to implement AD HOC wireless project with mobility I wanted to know the maximum mobility speed of a node during a simulation in omnet++?
0
votes
2 answers

Set per request i18n fallbacks in Rails?

I have a multi-country Rails app. And I need to set per request i18n fallbacks schema. Is it possible and how to achieve this? UPD class Country < ApplicationRecord # String attribute "languages" (array) end class CountriesController <…
Molfar
  • 1,411
  • 3
  • 18
  • 49
0
votes
1 answer

Language switching with Mobility Gem

How can I create a language toggle with the Mobility gem? Coming from Globalize I was using: <% if I18n.locale == I18n.default_locale %> <% Globalize.with_locale(:fr) do %> <%= link_to "Français", url_for(slug: @page.slug, locale: 'fr') %> …
bgilbank
  • 35
  • 6
0
votes
0 answers

Using the `mobility` gem with advanced PostgreSQL types like text[]

We are using the mobility gem to translate database content in a rails 6 app running on PostgreSQL, and we’re making use of advanced database types such as text[] (array of text). Before installing mobility, this would be transparent to the app,…
moeffju
  • 4,363
  • 2
  • 23
  • 22
0
votes
1 answer

How to call custom functions of Gem(By adding any attr_accessor/Method/Callbacks in model) whenever we run listing/find query from controller?

I am working on developing my custom gem which will be providing translations based on given parameters. I have used mobility gem https://github.com/shioyama/mobility as a dependency of my custom gem. I have prepared a common function in our custom…
0
votes
1 answer

Calling obj.i18.pluck in a model with a jsonb backend gives a TypeError

I'm using Mobility 0.8.4 and when I try to pluck an attribute from a model, it raises a TypeError. # models/skill.rb class Skill < ApplicationRecord extend Mobility translates :name, backend: :jsonb end # db/schema.rb create_table "skills" do…
0
votes
0 answers

Getting returned language when using fallbacks

Is there a way to get the language that the https://github.com/shioyama/mobility gem returned whe using a fallback? e.g i have something like this resource.description_backend.write(:en, "Foo") resource.description_backend.write(:de,…
Thollsten
  • 223
  • 1
  • 2
  • 6
0
votes
1 answer

Deleting a single translation from a model in a Rails project using Mobility

I'm migrating a Rails project from Globalize to Mobility. With Globalize, I had access to the current translation through the translation method: feature.translation I used this mainly when managing translations for a model to delete a specific…
partydrone
  • 507
  • 4
  • 15
0
votes
1 answer

How to implement all translations in one form with Mobility gem in Rails?

In my Rails app i'm using Mobility gem for translations How to build a form with all translations, like: name [en]: _______ name [fr]: ________ name [de]: _______ ... What is the best way?
0
votes
1 answer

"Preview Version" button not visible for remote server ibm mobilefirst operations console 7.1

We have installed the mobilefirst server on a RHEL 6.5 system. On successful deployment of the application on the server. On opening the mobilefirst operations console, we see that the "Preview Version" is not visible. We are able to see only the…
0
votes
0 answers

How to implement bookmark feature by using WKWebview?

I would like to design a custom WebView component with the help of Apple WKWebView for in- app browsing, but couldn't get any idea how to implement bookmark feature(similar to safari). Any suggestions are welcome. Thanks in advance.
srinu
  • 93
  • 2
  • 10
0
votes
0 answers

Textbox overlays with Keyboard

I have used cordova for my html5 application. Now whenever I am pressing the textbox the keypad appears but this keypad overlays the textbox and my screen is not move to top. But funny part is this issue happens only once after that installation.…
0
votes
1 answer

How can I provide mobility to motes in cooja?

I would like to assign mobility to motes already deployed. The deployment method can be anyone among the given options given in cooja. Can anyone please tell me how to assign mobility?