actionview-component 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/lib/action_view/component/railtie.rb +9 -5
- data/lib/action_view/component/version.rb +1 -1
- 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: 84c85d88f1ceefc7d3a0c97affcaa2465120a4513f0f445863a068715cb55f88
|
4
|
+
data.tar.gz: ad3ae8d04886ee3c22f79b73998e6d3d0156f9ef8e84cd64468139a6bd9b282a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd41865d44d1b450f9772ff3da1dac80b5873c809bb4cc598c93be37e15c074fb5fdbf5186350af13a8da65d7c8502dcccfd069e7e71ef86e4b87b19891f4bcd
|
7
|
+
data.tar.gz: c44f9d1129c3597553abf20510ec50a9f490b707bc121fd0bee8f7046ae257a6cf0a6517e91bdfa14391e1028b88565f14eda017224c79577700741ef85560c1
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -27,6 +27,14 @@ module ActionView
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
+
initializer "action_view_component.set_autoload_paths" do |app|
|
31
|
+
options = app.config.action_view_component
|
32
|
+
|
33
|
+
if options.show_previews && options.preview_path
|
34
|
+
ActiveSupport::Dependencies.autoload_paths << options.preview_path
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
30
38
|
initializer "action_view_component.compile_config_methods" do
|
31
39
|
ActiveSupport.on_load(:action_view_component) do
|
32
40
|
config.compile_methods! if config.respond_to?(:compile_methods!)
|
@@ -44,13 +52,9 @@ module ActionView
|
|
44
52
|
|
45
53
|
if options.show_previews
|
46
54
|
app.routes.prepend do
|
47
|
-
get "/rails/components"
|
55
|
+
get "/rails/components" => "rails/components#index", :internal => true
|
48
56
|
get "/rails/components/*path" => "rails/components#previews", :internal => true
|
49
57
|
end
|
50
|
-
|
51
|
-
if options.preview_path
|
52
|
-
ActiveSupport::Dependencies.autoload_paths << options.preview_path
|
53
|
-
end
|
54
58
|
end
|
55
59
|
end
|
56
60
|
end
|