view_component 2.10.0 → 2.11.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/CHANGELOG.md +10 -0
- data/README.md +4 -4
- data/lib/view_component/base.rb +3 -3
- data/lib/view_component/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eec4666da3c79cf466b01641169db9055d1201684acf30169d05cfb9129a7dc2
|
|
4
|
+
data.tar.gz: 6cfe7e0dee9f5becab077ba05093ea04a38927d2b4cf22d58bff9c4a3cbcd0e3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3a49b502f6f62c611ff8f700d4a84a2fe30e2a203a57a81964a2d99b005bd20ce431a93ba2319d7ac0dd1a358147d4bec97747b97ea3c386b2e27b5a4a4c241
|
|
7
|
+
data.tar.gz: 4c98f7b14919f9d56ec3a73e179be99f19cd2ec4157591bf3d1661cd5e8fd9a893110b4ba67dc8f0e79095b8d13974ed8a59904df41016f59515998316c03f2b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# master
|
|
2
2
|
|
|
3
|
+
# 2.11.0
|
|
4
|
+
|
|
5
|
+
* Ensure Rails configuration is available within components.
|
|
6
|
+
|
|
7
|
+
*Trevor Broaddus*
|
|
8
|
+
|
|
9
|
+
* Fix bug where global Rails helpers are inaccessible from nested components. Before, `helpers` was pointing to parent component.
|
|
10
|
+
|
|
11
|
+
*Franco Sebregondi*
|
|
12
|
+
|
|
3
13
|
# 2.10.0
|
|
4
14
|
|
|
5
15
|
* Raise an `ArgumentError` with a helpful message when Ruby cannot parse a component class.
|
data/README.md
CHANGED
|
@@ -784,10 +784,10 @@ ViewComponent is built by:
|
|
|
784
784
|
|@simonrand|@fugufish|@cover|@franks921|@fsateler|
|
|
785
785
|
|Dublin, Ireland|Salt Lake City, Utah|Barcelona|South Africa|Chile|
|
|
786
786
|
|
|
787
|
-
|<img src="https://avatars.githubusercontent.com/maxbeizer?s=256" alt="maxbeizer" width="128" />|
|
|
788
|
-
|
|
789
|
-
|@maxbeizer|
|
|
790
|
-
|Nashville, TN|
|
|
787
|
+
|<img src="https://avatars.githubusercontent.com/maxbeizer?s=256" alt="maxbeizer" width="128" />|<img src="https://avatars.githubusercontent.com/franco?s=256" alt="franco" width="128" />|<img src="https://avatars.githubusercontent.com/tbroad-ramsey?s=256" alt="tbroad-ramsey" width="128" />|
|
|
788
|
+
|:---:|:---:|:---:|
|
|
789
|
+
|@maxbeizer|@franco|@tbroad-ramsey|
|
|
790
|
+
|Nashville, TN|Switzerland|Spring Hill, TN|
|
|
791
791
|
|
|
792
792
|
## License
|
|
793
793
|
|
data/lib/view_component/base.rb
CHANGED
|
@@ -12,7 +12,7 @@ module ViewComponent
|
|
|
12
12
|
include ViewComponent::Previewable
|
|
13
13
|
|
|
14
14
|
# For CSRF authenticity tokens in forms
|
|
15
|
-
delegate :form_authenticity_token, :protect_against_forgery?, to: :helpers
|
|
15
|
+
delegate :form_authenticity_token, :protect_against_forgery?, :config, to: :helpers
|
|
16
16
|
|
|
17
17
|
class_attribute :content_areas
|
|
18
18
|
self.content_areas = [] # class_attribute:default doesn't work until Rails 5.2
|
|
@@ -106,9 +106,9 @@ module ViewComponent
|
|
|
106
106
|
@controller ||= view_context.controller
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
-
# Provides a proxy to access helper methods
|
|
109
|
+
# Provides a proxy to access helper methods from the context of the current controller
|
|
110
110
|
def helpers
|
|
111
|
-
@helpers ||= view_context
|
|
111
|
+
@helpers ||= controller.view_context
|
|
112
112
|
end
|
|
113
113
|
|
|
114
114
|
# Removes the first part of the path and the extension.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: view_component
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitHub Open Source
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-06-
|
|
11
|
+
date: 2020-06-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|