Module: InertiaRails::Controller::ClassMethods
- Defined in:
- lib/inertia_rails/controller.rb
Instance Method Summary collapse
Instance Method Details
#inertia_share(**args, &block) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/inertia_rails/controller.rb', line 21 def inertia_share(**args, &block) before_action do InertiaRails.share(**args) if args InertiaRails.share_block(block) if block end end |
#use_inertia_instance_props ⇒ Object
28 29 30 31 32 33 |
# File 'lib/inertia_rails/controller.rb', line 28 def use_inertia_instance_props before_action do @_inertia_instance_props = true @_inertia_skip_props = view_assigns.keys + ['_inertia_skip_props'] end end |