Skip to content

Commit 95fc52b

Browse files
committed
added specs for component access tp action view context and added access to action view context for apps
1 parent 38c8082 commit 95fc52b

15 files changed

+17286
-1
lines changed

app/concepts/matestack/ui/core/app/app.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ class App < Trailblazer::Cell
44
include Matestack::Ui::Core::Cell
55
include Matestack::Ui::Core::ApplicationHelper
66
include Matestack::Ui::Core::ToCell
7+
include Matestack::Ui::Core::HasViewContext
78

89
view_paths << "#{Matestack::Ui::Core::Engine.root}/app/concepts"
910

app/concepts/matestack/ui/core/page/page.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ def show(component_key=nil, only_page=false)
8989
nodes_to_cell
9090
render :page
9191
when :render_page_with_app
92-
concept(@app_class).call(:show, @page_id, @nodes)
92+
@app_class.new(nil, context: {
93+
params: options[:context][:params],
94+
request: options[:context][:request],
95+
view_context: options[:context][:view_context]
96+
}, controller_instance: options[:controller_instance]).call(:show, @page_id, @nodes)
9397
when :render_component
9498
begin
9599
render_child_component component_key

spec/dummy/public/packs-test/js/application-523107e3f7258f36c3ed.js

Lines changed: 17049 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/dummy/public/packs-test/js/application-523107e3f7258f36c3ed.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/dummy/public/packs-test/js/application-a0dd669893d8c2bbbbb9.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*!
2+
* Determine if an object is a Buffer
3+
*
4+
* @author Feross Aboukhadijeh <https://feross.org>
5+
* @license MIT
6+
*/
7+
8+
/*!
9+
* Vue.js v2.6.10
10+
* (c) 2014-2019 Evan You
11+
* Released under the MIT License.
12+
*/
13+
14+
/**
15+
* vuex v3.1.1
16+
* (c) 2019 Evan You
17+
* @license MIT
18+
*/
Binary file not shown.

spec/dummy/public/packs-test/js/application-a0dd669893d8c2bbbbb9.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"application.js": "/packs-test/js/application-523107e3f7258f36c3ed.js",
3+
"application.js.map": "/packs-test/js/application-523107e3f7258f36c3ed.js.map",
4+
"entrypoints": {
5+
"application": {
6+
"js": [
7+
"/packs-test/js/application-523107e3f7258f36c3ed.js"
8+
],
9+
"js.map": [
10+
"/packs-test/js/application-523107e3f7258f36c3ed.js.map"
11+
]
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)