buddy_translatable 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 137d4c2784bfe06dbd6969ccb23c08230752a379d1c16cae7c86f2bd3a26c77c
4
- data.tar.gz: 41137ae24aa4c5ce86f6e418824e44fcd6d7754041d0c4129c02587153895bdc
3
+ metadata.gz: 4e189cdc05da2e42b02d5863d2b936003417be87ec79076a111c7c96278fab31
4
+ data.tar.gz: 3cc54ac8f488cdb2318fcc624b1a2719c7db976b8b270d274788eae73ab25dd4
5
5
  SHA512:
6
- metadata.gz: 9428062d7b98175ab808858b9598e85bfbd19686862c72f7f1fc23e4d87e3b0323ff7b7606066cbee56b6c0a01e9432e2effc61598d5733fc8d1630e8c26ba8a
7
- data.tar.gz: 5de3c7ecc7ce1f3c0aebaa0579952584552d9a446b0a9e4c8d1a4b8e37927d3cb170181a66be3092504aac8bcb9fedc0074d924b5a0c4253346e398d02fe1090
6
+ metadata.gz: d83e39ffa2db864154bb58cbebef361034c20c9f7388b6191bbce7b0fcd030b3250f608e0ed8dd5cb66262fad941e5bc6b758b7358cb18e5b3207b8bd1124415
7
+ data.tar.gz: 7b97f4bdce0772d5fd170bc195110b445eb211754e18fbd99edac3ad6a34795ca6632ffa892f10d594497a2aee99702ae8ae43c3bbae7e6bd625d8e9b26b2ea9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- buddy_translatable (1.0.1)
4
+ buddy_translatable (1.0.2)
5
5
  activerecord
6
6
  activesupport
7
7
  i18n
data/README.md CHANGED
@@ -11,7 +11,10 @@ Allows you to store text data in multiple languages. Based on [translateable](ht
11
11
  ```ruby
12
12
  class Post < ActiveRecord::Base
13
13
  include BuddyTranslatable
14
- translatable :title, default_key: :de
14
+ translatable :title
15
+ # translatable :title, default_key: :de, available_locales: [:de, :en]
16
+ # default_key: by default use `I18n.default_locale`
17
+ # available_locales: by default `I18n.available_locales`
15
18
  end
16
19
 
17
20
  post = Post.create(title: { de: 'Hallo', en: 'Hello' })
@@ -2,7 +2,7 @@
2
2
 
3
3
  module BuddyTranslatable
4
4
  module Core
5
- def translatable(*attrs, default_key: :en, available_locales: nil)
5
+ def translatable(*attrs, default_key: I18n.default_locale, available_locales: nil)
6
6
  available_locales ||= I18n.available_locales
7
7
  attrs.each do |attr|
8
8
  define_translatable_methods(attr, default_key.to_sym)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BuddyTranslatable
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buddy_translatable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-18 00:00:00.000000000 Z
11
+ date: 2021-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler