Module: InertiaRails
- Defined in:
- lib/inertia_rails.rb,
lib/inertia_rails/lazy.rb,
lib/inertia_rails/rspec.rb,
lib/inertia_rails/engine.rb,
lib/inertia_rails/version.rb,
lib/inertia_rails/renderer.rb,
lib/inertia_rails/controller.rb,
lib/inertia_rails/middleware.rb,
lib/inertia_rails/inertia_rails.rb,
lib/generators/inertia_rails/install_generator.rb,
app/controllers/inertia_rails/static_controller.rb
Defined Under Namespace
Modules: Configuration, Controller, Helper, RSpec
Classes: Engine, Error, InstallGenerator, Lazy, Middleware, Renderer, StaticController
Constant Summary
collapse
- VERSION =
"2.0.1"
Class Method Summary
collapse
Class Method Details
10
11
12
|
# File 'lib/inertia_rails/inertia_rails.rb', line 10
def self.configure
yield(Configuration)
end
|
35
36
37
|
# File 'lib/inertia_rails/inertia_rails.rb', line 35
def self.
self. || []
end
|
48
49
50
|
# File 'lib/inertia_rails/inertia_rails.rb', line 48
def self.()
self. =
end
|
.layout ⇒ Object
23
24
25
|
# File 'lib/inertia_rails/inertia_rails.rb', line 23
def self.layout
Configuration.layout
end
|
.lazy(value = nil, &block) ⇒ Object
58
59
60
|
# File 'lib/inertia_rails/inertia_rails.rb', line 58
def self.lazy(value = nil, &block)
InertiaRails::Lazy.new(value, &block)
end
|
.reset! ⇒ Object
52
53
54
55
56
|
# File 'lib/inertia_rails/inertia_rails.rb', line 52
def self.reset!
self.shared_plain_data = {}
self.shared_blocks = []
self. = []
end
|
.share(**args) ⇒ Object
40
41
42
|
# File 'lib/inertia_rails/inertia_rails.rb', line 40
def self.share(**args)
self.shared_plain_data = self.shared_plain_data.merge(args)
end
|
.share_block(block) ⇒ Object
44
45
46
|
# File 'lib/inertia_rails/inertia_rails.rb', line 44
def self.share_block(block)
self.shared_blocks = self.shared_blocks + [block]
end
|
.shared_data(controller) ⇒ Object
15
16
17
|
# File 'lib/inertia_rails/inertia_rails.rb', line 15
def self.shared_data(controller)
shared_plain_data.merge!(evaluated_blocks(controller, shared_blocks))
end
|
.ssr_enabled? ⇒ Boolean
27
28
29
|
# File 'lib/inertia_rails/inertia_rails.rb', line 27
def self.ssr_enabled?
Configuration.ssr_enabled
end
|
.ssr_url ⇒ Object
31
32
33
|
# File 'lib/inertia_rails/inertia_rails.rb', line 31
def self.ssr_url
Configuration.ssr_url
end
|