Module: Crystal::RoutingHelper

Defined in:
lib/crystal/router/routing_helper.rb

Instance Method Summary collapse

Instance Method Details

#default_path(options = {}) ⇒ Object



7
8
9
# File 'lib/crystal/router/routing_helper.rb', line 7

def default_path options = {}
  url_for_path config.default_path!, options.merge(:url_root => false)
end

#return_to_path(options = {}) ⇒ Object



11
12
13
14
15
# File 'lib/crystal/router/routing_helper.rb', line 11

def return_to_path options = {}
  do_not_persist_params do 
    url_for_path params[:_return_to] || session[:return_to] || config.default_path!, options.merge(:url_root => false)
  end
end