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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66521e84077cac73f9c94df1323b7b7eefc168c47fa635a10ea92ca18ed2791b
4
- data.tar.gz: 21add4be61c4e1dddb543704355b4263f5b87a7f8d9060d8c48f309d78703ed2
3
+ metadata.gz: eec4666da3c79cf466b01641169db9055d1201684acf30169d05cfb9129a7dc2
4
+ data.tar.gz: 6cfe7e0dee9f5becab077ba05093ea04a38927d2b4cf22d58bff9c4a3cbcd0e3
5
5
  SHA512:
6
- metadata.gz: 532230cb3c84dfd7d492b9f6ee1278dd2706b8c052a667c9be76467cf227616cbc90a69de7c675338ac3a46149b8b241a79668d6d7d399d1d3d7f52cd4251251
7
- data.tar.gz: 4a3f0f2a7a4dabb25738e48ddbe92a704e2117e02ab1b38fbccc4c33913cc57115c4bc81e78c57647d5a2ca94843b0f9d79d64b559b0fd1c297fef2f56425194
6
+ metadata.gz: f3a49b502f6f62c611ff8f700d4a84a2fe30e2a203a57a81964a2d99b005bd20ce431a93ba2319d7ac0dd1a358147d4bec97747b97ea3c386b2e27b5a4a4c241
7
+ data.tar.gz: 4c98f7b14919f9d56ec3a73e179be99f19cd2ec4157591bf3d1661cd5e8fd9a893110b4ba67dc8f0e79095b8d13974ed8a59904df41016f59515998316c03f2b
@@ -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
 
@@ -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.
@@ -3,7 +3,7 @@
3
3
  module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 2
6
- MINOR = 10
6
+ MINOR = 11
7
7
  PATCH = 0
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].join(".")
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.10.0
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-15 00:00:00.000000000 Z
11
+ date: 2020-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport