base_editing_bootstrap 0.10.1 → 0.10.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: 0cfab325e65eaeb13a6e34182d3c1a151c2d017ef22b6ad738018f8371c9ad91
4
- data.tar.gz: 73ea49a506e054334cb49990a3b5cd6acbae01914ff1d6432715d2239f39968b
3
+ metadata.gz: 1e1b2b4d7acdd0cc339988fde4d7ce56578bc2cb692184c77cb47e90f256f2d7
4
+ data.tar.gz: 30b9e2672ac29a97722f1f163ee6ed5e7cb9473d5aac9f5ad85bdd9621e0b351
5
5
  SHA512:
6
- metadata.gz: 71569182d6f892535f8a780e09d4fbf842e042ba23b365f650761d8913d033abc1b703e4d4219b1bc10f0c6de5110debed48b4078619957aee25be0cbec2ef66
7
- data.tar.gz: 8c7211b8e0342d014870df332e469697f7d7253f5e7fac39e8c72bdc6be13a90d3bc78d7dd7d55840795b2016f724b92998911dc07a9917024ee0c966b07e6a9
6
+ metadata.gz: 6e6d302e8a9d8e644b1eebfdccef92b85437651fb36f74264b38384afb0e237412858d3a86f58d81579b7b981c5891bad5706fb72e3c42b2b9c994fd3b907cb2
7
+ data.tar.gz: d32ad07d930010e7a7ae647619dcd42cd61ca4e30ffa86bde4f42c5be8a10a75102788f121217fe613972e083c4e2dea4b4c1a8667dbeb96430d220a20f73d59
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
  All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
3
3
 
4
4
  - - -
5
+ ## 0.10.2 - 2024-09-05
6
+ #### Bug Fixes
7
+ - Force to_s ransackable_attributes - (a5c8cbb) - Marino Bonetti
8
+ #### Documentation
9
+ - Typo - (2ba91c6) - Marino Bonetti
10
+
11
+ - - -
12
+
5
13
  ## 0.10.1 - 2024-07-25
6
14
  #### Bug Fixes
7
15
  - Change from controller_name to controller_path (#3) - (8b123a4) - Jury Ghidinelli
data/README.md CHANGED
@@ -137,7 +137,7 @@ Utilizzo per modello base, in questo esempio prendiamo come modello Post come es
137
137
  - Integer => _integer.html.erb
138
138
  - Float => _decimal.html.erb
139
139
  - Decimal => _decimal.html.erb
140
- - DateTime => _detetime.html.erb
140
+ - DateTime => _datetime.html.erb
141
141
  - Date => _date.html.erb
142
142
  - Enum => _enum.html.erb
143
143
  Per gli enum, le traduzioni dei labels di ogni valore provvengono da i18n
@@ -1 +1 @@
1
- 0.10.1
1
+ 0.10.2
@@ -12,9 +12,9 @@ module BaseEditingBootstrap
12
12
  class_methods do
13
13
  def ransackable_attributes(auth_object = nil)
14
14
  if auth_object
15
- Pundit.policy(auth_object, self.new).permitted_attributes_for_ransack
15
+ Pundit.policy(auth_object, self.new).permitted_attributes_for_ransack.map(&:to_s)
16
16
  else
17
- Pundit.policy(User.new, self.new).permitted_attributes_for_ransack
17
+ Pundit.policy(User.new, self.new).permitted_attributes_for_ransack.map(&:to_s)
18
18
  end
19
19
  end
20
20
 
@@ -3,13 +3,19 @@ RSpec.shared_examples "a base model" do |ransack_permitted_attributes: [], ransa
3
3
  it_behaves_like "a validated? object"
4
4
 
5
5
  describe "with ransackables" do
6
- where(:base_model_method, :policy_method, :result) do
6
+ where(:base_model_method, :policy_method, :policy_output, :result) do
7
7
  [
8
8
  [
9
- :ransackable_attributes, :permitted_attributes_for_ransack, ransack_permitted_attributes
9
+ :ransackable_attributes, :permitted_attributes_for_ransack, ransack_permitted_attributes.map(&:to_s), ransack_permitted_attributes.map(&:to_s)
10
10
  ],
11
11
  [
12
- :ransackable_associations, :permitted_associations_for_ransack, ransack_permitted_associations
12
+ :ransackable_attributes, :permitted_attributes_for_ransack, ransack_permitted_attributes.map(&:to_sym), ransack_permitted_attributes.map(&:to_s)
13
+ ],
14
+ [
15
+ :ransackable_associations, :permitted_associations_for_ransack,ransack_permitted_associations.map(&:to_s), ransack_permitted_associations.map(&:to_s)
16
+ ],
17
+ [
18
+ :ransackable_associations, :permitted_associations_for_ransack, ransack_permitted_associations.map(&:to_sym), ransack_permitted_associations.map(&:to_s)
13
19
  ]
14
20
  ]
15
21
  end
@@ -23,7 +29,7 @@ RSpec.shared_examples "a base model" do |ransack_permitted_attributes: [], ransa
23
29
  # end
24
30
  let(:auth_object) { nil }
25
31
  let(:policy) {
26
- instance_double("BaseModelPolicy", policy_method => result)
32
+ instance_double("BaseModelPolicy", policy_method => policy_output)
27
33
  }
28
34
  it "new user" do
29
35
  expect(Pundit).to receive(:policy).with(an_instance_of(User),
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: base_editing_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marino Bonetti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-25 00:00:00.000000000 Z
11
+ date: 2024-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails