abyme 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -1
- data/Gemfile.lock +1 -1
- data/README.md +2 -1
- data/lib/abyme/action_view_extensions/builder.rb +2 -0
- data/lib/abyme/model.rb +2 -0
- data/lib/abyme/version.rb +1 -1
- data/lib/abyme/view_helpers.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29bd9abd9bf5c46d2c23b9c53cbe38990d03078c87fd6face66bb865493aa5a5
|
4
|
+
data.tar.gz: d118f6af056ca064e405c4c8a4c6df2c4fbe52864387cd45bee8f558f1990018
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43692f0d91e0afe0f20ad57b6e89d914eb359efe175c1ff2649f362d8b6e275084067d1ed219152fead5f6782374498644c372a74c2d4f163b60696c495c8995
|
7
|
+
data.tar.gz: 007b9b1df96b8de5690c54c4b4083176641af8980e464b35d83b2bfcc4e84a9f53ecc9d5d41540c8131cfd134f2931bebc9f08f7cce83b94d0fee4f766dca7d8
|
data/CHANGELOG.md
CHANGED
@@ -2,11 +2,32 @@
|
|
2
2
|
|
3
3
|
## [Unreleased](https://github.com/bear-in-mind/abyme/tree/HEAD)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/bear-in-mind/abyme/compare/v0.
|
5
|
+
[Full Changelog](https://github.com/bear-in-mind/abyme/compare/v0.5.0...HEAD)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- retro compatibility with former public method names [\#26](https://github.com/bear-in-mind/abyme/pull/26) ([bear-in-mind](https://github.com/bear-in-mind))
|
10
|
+
|
11
|
+
## [v0.5.0](https://github.com/bear-in-mind/abyme/tree/v0.5.0) (2021-02-26)
|
12
|
+
|
13
|
+
[Full Changelog](https://github.com/bear-in-mind/abyme/compare/v0.2.5...v0.5.0)
|
14
|
+
|
15
|
+
**Merged pull requests:**
|
16
|
+
|
17
|
+
- Dynamic strong params for nested attributes [\#23](https://github.com/bear-in-mind/abyme/pull/23) ([bear-in-mind](https://github.com/bear-in-mind))
|
18
|
+
|
19
|
+
## [v0.2.5](https://github.com/bear-in-mind/abyme/tree/v0.2.5) (2021-02-12)
|
20
|
+
|
21
|
+
[Full Changelog](https://github.com/bear-in-mind/abyme/compare/v0.4.0...v0.2.5)
|
22
|
+
|
23
|
+
## [v0.4.0](https://github.com/bear-in-mind/abyme/tree/v0.4.0) (2021-02-12)
|
24
|
+
|
25
|
+
[Full Changelog](https://github.com/bear-in-mind/abyme/compare/v0.2.4...v0.4.0)
|
6
26
|
|
7
27
|
**Merged pull requests:**
|
8
28
|
|
9
29
|
- Bump nokogiri from 1.10.10 to 1.11.1 [\#22](https://github.com/bear-in-mind/abyme/pull/22) ([dependabot[bot]](https://github.com/apps/dependabot))
|
30
|
+
- Methods naming change & FormBuilder extension [\#21](https://github.com/bear-in-mind/abyme/pull/21) ([bear-in-mind](https://github.com/bear-in-mind))
|
10
31
|
- Solved JS compile bug [\#19](https://github.com/bear-in-mind/abyme/pull/19) ([bear-in-mind](https://github.com/bear-in-mind))
|
11
32
|
|
12
33
|
## [v0.2.4](https://github.com/bear-in-mind/abyme/tree/v0.2.4) (2020-10-18)
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
[![Maintainability](https://api.codeclimate.com/v1/badges/f591a9e00f7cf5188ad5/maintainability)](https://codeclimate.com/github/bear-in-mind/abyme/maintainability)
|
6
6
|
[![Coverage Status](https://coveralls.io/repos/github/bear-in-mind/abyme/badge.svg)](https://coveralls.io/github/bear-in-mind/abyme?branch=master)
|
7
7
|
|
8
|
-
abyme is an easy and
|
8
|
+
abyme is an easy and form-agnostic way to handle nested attributes in Rails, using [stimulus](https://stimulusjs.org/handbook/introduction) under the hood. Here's an example :
|
9
9
|
```ruby
|
10
10
|
# views/projects/_form.html.erb
|
11
11
|
<%= form_for @project do |f| %>
|
@@ -40,6 +40,7 @@ In views:
|
|
40
40
|
- `add_association` became `add_associated_record`
|
41
41
|
- `remove_association` became `remove_associated_record`
|
42
42
|
|
43
|
+
The former method names will be deprecated soon.
|
43
44
|
If you update, don't forget to change those ! All changes are reflected in the README below.
|
44
45
|
|
45
46
|
## Installation
|
data/lib/abyme/model.rb
CHANGED
@@ -10,6 +10,8 @@ module Abyme
|
|
10
10
|
Abyme::Model.permit_attributes(self.name, association, permit || reject, permit.present?) if permit.present? || reject.present?
|
11
11
|
end
|
12
12
|
|
13
|
+
alias :abyme_for :abymize
|
14
|
+
|
13
15
|
def abyme_attributes
|
14
16
|
Abyme::Model.instance_variable_get(:@permitted_attributes)[self.name]
|
15
17
|
end
|
data/lib/abyme/version.rb
CHANGED
data/lib/abyme/view_helpers.rb
CHANGED
@@ -54,6 +54,8 @@ module Abyme
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
+
alias :abymize :abyme_for
|
58
|
+
|
57
59
|
# NEW_RECORDS_FOR
|
58
60
|
|
59
61
|
# this helper is call by the AbymeBuilder #new_records instance method
|
@@ -203,6 +205,9 @@ module Abyme
|
|
203
205
|
create_button(action, options, &block)
|
204
206
|
end
|
205
207
|
|
208
|
+
alias :add_association :add_associated_record
|
209
|
+
alias :remove_association :remove_associated_record
|
210
|
+
|
206
211
|
private
|
207
212
|
|
208
213
|
# CREATE_BUTTON
|