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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb0f45e02d147c46725a521f0e789998a6c99172333daa039eb5cd0544805c52
4
- data.tar.gz: f849cda4209753325ecbb737683b510c19f52fb22ac2aa72e095e67c56d5b24f
3
+ metadata.gz: 29bd9abd9bf5c46d2c23b9c53cbe38990d03078c87fd6face66bb865493aa5a5
4
+ data.tar.gz: d118f6af056ca064e405c4c8a4c6df2c4fbe52864387cd45bee8f558f1990018
5
5
  SHA512:
6
- metadata.gz: a091fd6a3a798accdcc60a119e7b435d72ce553aea6896e041583d6df65d64157e1511031bad28a8d5b9042c2df3c3501400819cf3791eda7c2ae53618f776e5
7
- data.tar.gz: f92d9395baad0cfa1a561a9c7936c9856b4b5049c5821040fbdb73aa55c9d444c9de2d5b7bdd59d70ce90e665967782311c9ba85250204f41d78bed644a24753
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.2.4...HEAD)
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- abyme (0.5.0)
4
+ abyme (0.5.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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 framework-agnostic way to handle nested attributes in Rails, using [stimulus](https://stimulusjs.org/handbook/introduction) under the hood. Here's an example :
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
@@ -4,6 +4,8 @@ module Abyme
4
4
  def abyme_for(association, options = {}, &block)
5
5
  @template.abyme_for(association, self, options, &block)
6
6
  end
7
+
8
+ alias :abymize :abyme_for
7
9
  end
8
10
  end
9
11
  end
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
@@ -3,7 +3,7 @@ module Abyme
3
3
  module VERSION
4
4
  MAJOR = 0
5
5
  MINOR = 5
6
- PATCH = 0
6
+ PATCH = 1
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH].join(".")
9
9
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abyme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Romain Sanson