Method: Jets::Router::MethodCreator::Code#url_method
- Defined in:
- lib/jets/router/method_creator/code.rb
#url_method ⇒ Object
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/jets/router/method_creator/code.rb', line 65 def url_method path_method_call = "#{full_meth_name(:path)}#{meth_args}" # Note: It is important lazily get the value of ENV['JETS_HOST'] within the method. # Since it is not set until the requrest goes through the main middleware. <<~EOL def #{full_meth_name(:url)}#{meth_args} "\#{ENV['JETS_HOST']}\#{#{path_method_call}}" end EOL end |