rails_accordion 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_accordion/engine.rb +0 -6
- data/lib/rails_accordion.rb +18 -0
- metadata +1 -2
- data/app/helpers/rails_accordion/application_helper.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8c3c4514120b3168aff3120e0b13292c7f2988c720106c864d019f8acb834c4
|
4
|
+
data.tar.gz: f91f2a9f0ebfc33416245309dc6c53e5b619b92cb5f792cd651fe14ecd70f674
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4a7a6fc21265d50dbbb8b5bb184340648009eb43ffc50931a3833b682fbfaabd8e7d2dc1be8ac5d728074be7deeb2d993901588722542d463d7c2eb5552d947
|
7
|
+
data.tar.gz: d6a09a1bb1e78fb7c778e5905037f13030344a228ae9806a156d9ad464fc187739013aadbde4aa4db33a622a9fbf9596b786ff7a788a8336a96bc14836c9af77
|
@@ -2,12 +2,6 @@ module RailsAccordion
|
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
isolate_namespace RailsAccordion
|
4
4
|
|
5
|
-
initializer "rails_accordion.helpers" do
|
6
|
-
ActiveSupport.on_load :action_controller do
|
7
|
-
helper RailsAccordion::ApplicationHelper
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
5
|
config.app_middleware.use(
|
12
6
|
Rack::Static,
|
13
7
|
urls: ["/rails_accordion_assets"],
|
data/lib/rails_accordion.rb
CHANGED
@@ -7,9 +7,27 @@ loader.ignore("#{__dir__}/generators")
|
|
7
7
|
loader.setup
|
8
8
|
|
9
9
|
module RailsAccordion
|
10
|
+
class Railtie < Rails::Railtie
|
11
|
+
ActiveSupport.on_load :action_view do
|
12
|
+
include RailsAccordion
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
10
16
|
def self.root
|
11
17
|
RailsAccordion::Engine.routes.find_script_name({})
|
12
18
|
end
|
19
|
+
|
20
|
+
def accordion(**args, &block)
|
21
|
+
render AccordionComponent.new(**args), &block
|
22
|
+
end
|
23
|
+
|
24
|
+
def accordion_item(**args, &block)
|
25
|
+
render ItemComponent.new(**args), &block
|
26
|
+
end
|
27
|
+
|
28
|
+
def rails_accordion_assets
|
29
|
+
render "rails_accordion/assets"
|
30
|
+
end
|
13
31
|
end
|
14
32
|
|
15
33
|
loader.eager_load
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_accordion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ahmadshoh Nasrullozoda
|
@@ -74,7 +74,6 @@ files:
|
|
74
74
|
- app/assets/stylesheets/rails_accordion.css
|
75
75
|
- app/components/accordion_component.rb
|
76
76
|
- app/components/item_component.rb
|
77
|
-
- app/helpers/rails_accordion/application_helper.rb
|
78
77
|
- app/javascript/controllers/accordion_controller.js
|
79
78
|
- app/javascript/rails_accordion.js
|
80
79
|
- app/views/rails_accordion/_assets.html.erb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module RailsAccordion
|
2
|
-
module ApplicationHelper
|
3
|
-
def accordion(**args, &block)
|
4
|
-
render AccordionComponent.new(**args), &block
|
5
|
-
end
|
6
|
-
|
7
|
-
def accordion_item(**args, &block)
|
8
|
-
render ItemComponent.new(**args), &block
|
9
|
-
end
|
10
|
-
|
11
|
-
def rails_accordion_assets
|
12
|
-
render "rails_accordion/assets"
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|