model_form_facade 0.1.0 → 0.2.0
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/README.md +2 -4
- data/lib/model_form_facade/version.rb +1 -1
- data/lib/model_form_facade.rb +3 -3
- 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: 37eeff80f823c63097225056dcdd5e37729c575cd192672b5b9c73760a3c8aad
|
4
|
+
data.tar.gz: 27db2d67731489da9baa739fc579b4c3c8ea77c3b5fcfd11d059b9862273c0d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7eee5b1bea77486d88d690c4562facbcbf1fd0bda2016a3dfa0c367415202cd24961a562002942178390f8c4a2f4f982105096d9eb41e6748636d3ddfe034a48
|
7
|
+
data.tar.gz: 9bd59e569bf94ed692f3785aba82f6878670b868b3b0aaa058bc8a741a01d9121843fbe006a3198bafd312ef25dcf696b00c443f87c3263524e84ee9db71fa34
|
data/README.md
CHANGED
@@ -6,18 +6,16 @@ Welcome to your new gem! In this directory, you'll find the files you need to be
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
10
|
-
|
11
9
|
Install the gem and add to the application's Gemfile by executing:
|
12
10
|
|
13
11
|
```bash
|
14
|
-
bundle add
|
12
|
+
bundle add model_form_facade
|
15
13
|
```
|
16
14
|
|
17
15
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
18
16
|
|
19
17
|
```bash
|
20
|
-
gem install
|
18
|
+
gem install model_form_facade
|
21
19
|
```
|
22
20
|
|
23
21
|
## Usage
|
data/lib/model_form_facade.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
require_relative "model_form_facade/version"
|
2
|
-
require "
|
2
|
+
require "active_support"
|
3
3
|
|
4
4
|
module ModelFormFacade
|
5
5
|
class Error < StandardError; end
|
6
|
-
|
6
|
+
|
7
7
|
extend ActiveSupport::Concern
|
8
8
|
|
9
9
|
included do
|
@@ -149,7 +149,7 @@ module ModelFormFacade
|
|
149
149
|
|
150
150
|
def create_form_class_for(field_name)
|
151
151
|
class_name = "anonymous_#{field_name}_form".camelize
|
152
|
-
const_set(class_name, Class.new.tap { _1.include
|
152
|
+
const_set(class_name, Class.new.tap { _1.include ModelFormFacade })
|
153
153
|
end
|
154
154
|
|
155
155
|
def field_methods_module
|