inline_forms 7.13.17 → 7.13.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/app/controllers/inline_forms_controller.rb +0 -32
- data/docs/git-deps-assessment.md +7 -20
- data/lib/inline_forms/version.rb +1 -1
- metadata +1 -5
- data/app/views/inline_forms/extract_translations.erb +0 -4
- data/lib/inline_forms/translation_record.rb +0 -14
- data/lib/otherstuff/20120310065554_inline_forms_create_view_for_translations.rb +0 -16
- data/lib/otherstuff/mkiftrans +0 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 899f49c45deb98aa07e86729fc4086d739d4afe73ffaea0bdc73ad1ce0f2a667
|
|
4
|
+
data.tar.gz: f6b30e56aef71c6ce4097702fd2af8e0d8a224a77e7859350f77dfc9df52466e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 98dc21591bfe38e86e110905ca1bad96e4e58e121d718acc07d6af4bfe4278eb0c6912d5c36d9884ccacf3ce00aeb7790ae00e1de6127b8bec9a8bfd4e4c9cbc
|
|
7
|
+
data.tar.gz: c2bab0e4ba2ed6654e324d941ced0b98e71a4183e88fb787f9af0d80c8d6310543dbe30716ac7e4bfc2dbcbfea702291d2447373512939933f8acb2290dc17ea
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to this project are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [7.13.18] - 2026-05-22
|
|
8
|
+
|
|
9
|
+
### Removed
|
|
10
|
+
|
|
11
|
+
- **DB-backed translations:** installer no longer generates `InlineFormsLocale`, `InlineFormsKey`, `InlineFormsTranslation`, or the `translations` SQL view migration. Removed `InlineForms::TranslationRecord`, `InlineFormsController#extract_translations`, its view, and YAML-export helpers (`deep_hashify`, `deep_merge`, `unravel`). Apps use standard Rails I18n YAML under `config/locales/` (e.g. `inline_forms_local.en.yml`); the old `i18n-active_record` path was never wired.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **`InlineForms::VERSION`** and **`InlineFormsInstaller::VERSION`** → **7.13.18** (lockstep with **validation_hints**).
|
|
16
|
+
|
|
7
17
|
## [7.13.17] - 2026-05-21
|
|
8
18
|
|
|
9
19
|
### Fixed
|
|
@@ -321,18 +321,6 @@ class InlineFormsController < ApplicationController
|
|
|
321
321
|
end
|
|
322
322
|
end
|
|
323
323
|
|
|
324
|
-
def extract_translations
|
|
325
|
-
keys_array = []
|
|
326
|
-
InlineForms::TranslationRecord.order(:locale, :thekey).each do |t|
|
|
327
|
-
keys_array << deep_hashify([ t.locale, t.thekey.split('.'), t.value ].flatten)
|
|
328
|
-
end
|
|
329
|
-
keys_hash = {}
|
|
330
|
-
keys_array.each do |h|
|
|
331
|
-
keys_hash = deep_merge(keys_hash, h)
|
|
332
|
-
end
|
|
333
|
-
@display_array = unravel(keys_hash)
|
|
334
|
-
end
|
|
335
|
-
|
|
336
324
|
private
|
|
337
325
|
|
|
338
326
|
# Versions list lives in +<turbo-frame id="…_versions">+; POST +restore+ would otherwise
|
|
@@ -478,26 +466,6 @@ class InlineFormsController < ApplicationController
|
|
|
478
466
|
params.require(:id)
|
|
479
467
|
end
|
|
480
468
|
|
|
481
|
-
def deep_hashify(ary)
|
|
482
|
-
return ary.to_s if ary.length == 1
|
|
483
|
-
{ ary.shift => deep_hashify(ary) }
|
|
484
|
-
end
|
|
485
|
-
|
|
486
|
-
def deep_merge(h1, h2)
|
|
487
|
-
return h1.merge(h2) unless h2.first[1].is_a? Hash
|
|
488
|
-
h1.merge(h2){|key, first, second| deep_merge(first, second)}
|
|
489
|
-
end
|
|
490
|
-
|
|
491
|
-
def unravel(deep_hash, level=-1)
|
|
492
|
-
level += 1
|
|
493
|
-
return "#{' '*level}\"#{deep_hash.first[0]}\": \"#{deep_hash.first[1]}\"\n" unless deep_hash.first[1].is_a? Hash
|
|
494
|
-
a = "#{' '*level}\"#{deep_hash.first[0]}\":\n"
|
|
495
|
-
deep_hash.first[1].each do |k,v|
|
|
496
|
-
a << unravel( { k => v}, level)
|
|
497
|
-
end
|
|
498
|
-
a
|
|
499
|
-
end
|
|
500
|
-
|
|
501
469
|
def revert_params
|
|
502
470
|
params.require(:id).permit(:update)
|
|
503
471
|
end
|
data/docs/git-deps-assessment.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|-----|-----|-----|--------|
|
|
14
14
|
| `will_paginate` | RubyGems + commented acesuares fork | RubyGems only | Fork never active; comment removed |
|
|
15
15
|
| `tabs_on_rails` | `acesuares/tabs_on_rails` branch `update_remote_before_action` | `~> 3.0` (weppos, RubyGems) | Fork only added unused `:remote` on tab links; upstream 3.0.0 already uses `before_action` |
|
|
16
|
-
| `i18n-active_record` | `acesuares/i18n-active_record` (2012) | **Removed**
|
|
16
|
+
| `i18n-active_record` | `acesuares/i18n-active_record` (2012) | **Removed** (7.13.18: no DB translation tables) | Never configured `I18n.backend`; DB tables/view and `extract_translations` removed |
|
|
17
17
|
|
|
18
18
|
**No generated-app Gemfile should use `:git` for these anymore.**
|
|
19
19
|
|
|
@@ -56,28 +56,15 @@ Branch `update_remote_before_action` on `acesuares/tabs_on_rails` (2019) did two
|
|
|
56
56
|
|
|
57
57
|
## `i18n-active_record`
|
|
58
58
|
|
|
59
|
-
###
|
|
60
|
-
|
|
61
|
-
- Upstream expects a `translations` table with column **`key`**.
|
|
62
|
-
- MySQL reserves `KEY`; acesuares fork renamed to **`thekey`** with `alias_attribute :key, :thekey`.
|
|
63
|
-
- Fork is **Rails 3 era** (`set_table_name`, `attr_protected`, last push 2012).
|
|
64
|
-
|
|
65
|
-
### What inline_forms actually uses
|
|
66
|
-
|
|
67
|
-
- Installer builds **InlineFormsKey / Locale / Translation** tables, then a SQL **VIEW** `translations` with columns `locale`, **`thekey`**, `value`, `interpolations`, `is_proc`.
|
|
68
|
-
- **`I18n.backend` is never configured** to `I18n::Backend::ActiveRecord` in generated apps.
|
|
69
|
-
- Only consumer: **`InlineFormsController#extract_translations`** (admin export of keys); not wired in default routes/tests.
|
|
59
|
+
### History
|
|
70
60
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
- **
|
|
74
|
-
- Adopting it would require renaming the view column to `key` (backtick on MySQL) and dropping the stale fork API.
|
|
75
|
-
|
|
76
|
-
### Verdict
|
|
61
|
+
- Fork existed because MySQL reserves `KEY`; acesuares fork used **`thekey`**.
|
|
62
|
+
- **7.13.5–7.13.17:** gem removed from Gemfile; installer still generated locale/key/translation tables + `translations` view; **`InlineForms::TranslationRecord`** read the view; **`extract_translations`** exported YAML (never routed by default).
|
|
63
|
+
- **`I18n.backend` was never** `I18n::Backend::ActiveRecord` in generated apps.
|
|
77
64
|
|
|
78
|
-
|
|
65
|
+
### Verdict (7.13.18+)
|
|
79
66
|
|
|
80
|
-
If
|
|
67
|
+
**No DB translation layer.** Generated apps use Rails I18n YAML only (`config/locales/inline_forms_local.en.yml`, etc.). If **I18n::Backend::ActiveRecord** is needed later, add **`i18n-active_record ~> 1.4`** and migrations separately—not via inline_forms installer.
|
|
81
68
|
|
|
82
69
|
---
|
|
83
70
|
|
data/lib/inline_forms/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: inline_forms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.13.
|
|
4
|
+
version: 7.13.18
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ace Suares
|
|
@@ -457,7 +457,6 @@ files:
|
|
|
457
457
|
- app/views/inline_forms/_versions.html.erb
|
|
458
458
|
- app/views/inline_forms/_versions_list.html.erb
|
|
459
459
|
- app/views/inline_forms/create_list_frame.html.erb
|
|
460
|
-
- app/views/inline_forms/extract_translations.erb
|
|
461
460
|
- app/views/inline_forms/field_edit.html.erb
|
|
462
461
|
- app/views/inline_forms/field_show.html.erb
|
|
463
462
|
- app/views/inline_forms/new_record.html.erb
|
|
@@ -548,14 +547,11 @@ files:
|
|
|
548
547
|
- lib/inline_forms/form_elements/text_field_helper.rb
|
|
549
548
|
- lib/inline_forms/form_elements/time_helper.rb
|
|
550
549
|
- lib/inline_forms/gem_files.rb
|
|
551
|
-
- lib/inline_forms/translation_record.rb
|
|
552
550
|
- lib/inline_forms/turbo_tabs_builder.rb
|
|
553
551
|
- lib/inline_forms/version.rb
|
|
554
552
|
- lib/locales/inline_forms.en.yml
|
|
555
553
|
- lib/locales/inline_forms.nl.yml
|
|
556
|
-
- lib/otherstuff/20120310065554_inline_forms_create_view_for_translations.rb
|
|
557
554
|
- lib/otherstuff/add_roles.sql
|
|
558
|
-
- lib/otherstuff/mkiftrans
|
|
559
555
|
- lib/otherstuff/mkrole
|
|
560
556
|
- lib/otherstuff/roles_users.sql
|
|
561
557
|
- lib/vagrant/vagrantbox-inline_forms.zip
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module InlineForms
|
|
4
|
-
# Read-only adapter for the +translations+ SQL view created by the installer
|
|
5
|
-
# (+inline_forms_create_view_for_translations+). The view exposes +thekey+
|
|
6
|
-
# (not +key+) so it works on MySQL where +key+ is reserved.
|
|
7
|
-
class TranslationRecord < ActiveRecord::Base
|
|
8
|
-
self.table_name = "translations"
|
|
9
|
-
|
|
10
|
-
def readonly?
|
|
11
|
-
true
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
class InlineFormsCreateViewForTranslations < ActiveRecord::Migration
|
|
2
|
-
|
|
3
|
-
execute 'CREATE VIEW translations ( locale, thekey, value, interpolations, is_proc )
|
|
4
|
-
AS
|
|
5
|
-
SELECT L.name, K.name, T.value, T.interpolations, T.is_proc
|
|
6
|
-
FROM if_keys K, if_locales L, if_translations T
|
|
7
|
-
WHERE T.if_key_id = K.id AND T.i_locale_id = L.id '
|
|
8
|
-
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def self.down
|
|
12
|
-
execute 'DROP VIEW translations'
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
end
|
data/lib/otherstuff/mkiftrans
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
rails g inline_forms IFLocale \
|
|
3
|
-
name:string \
|
|
4
|
-
if_translations:belongs_to \
|
|
5
|
-
_enabled:yes _presentation:'#{name}' -f
|
|
6
|
-
|
|
7
|
-
rails g inline_forms IFKey \
|
|
8
|
-
name:string \
|
|
9
|
-
if_translations:has_many if_translations:associated \
|
|
10
|
-
_enabled:yes _presentation:'#{name}' -f
|
|
11
|
-
|
|
12
|
-
rails g inline_forms IFTranslation \
|
|
13
|
-
if_key:belongs_to \
|
|
14
|
-
if_locale:dropdown \
|
|
15
|
-
value:text \
|
|
16
|
-
interpolations:text \
|
|
17
|
-
is_proc:boolean \
|
|
18
|
-
_presentation:'#{value}' -f
|
|
19
|
-
|
|
20
|
-
bundle exec rake db:migrate
|
|
21
|
-
|