Class: MuchRails::Action::Router::URL

Inherits:
BaseRouter::BaseURL show all
Defined in:
lib/much-rails/action/router.rb

Instance Attribute Summary

Attributes inherited from BaseRouter::BaseURL

#router, #url_name, #url_path

Instance Method Summary collapse

Methods inherited from BaseRouter::BaseURL

#==, for, #initialize, #name, #path, url_name, url_path

Constructor Details

This class inherits a constructor from MuchRails::Action::BaseRouter::BaseURL

Instance Method Details

#path_for(**kargs) ⇒ Object



115
116
117
118
119
120
# File 'lib/much-rails/action/router.rb', line 115

def path_for(**kargs)
  MuchRails::RailsRoutes.instance.public_send(
    "#{name}_path",
    **kargs.symbolize_keys.except(:format),
  )
end

#url_for(**kargs) ⇒ Object



122
123
124
125
126
127
# File 'lib/much-rails/action/router.rb', line 122

def url_for(**kargs)
  MuchRails::RailsRoutes.instance.public_send(
    "#{name}_url",
    **kargs.symbolize_keys.except(:format),
  )
end