Url For
url_for controller: 'tasks', action: 'testing', host: 'example.org', port: '8080'
# => 'http://example.org:8080/tasks/testing'
url_for controller: 'tasks', action: 'testing', host: 'example.org',
anchor: 'ok', only_path: true
# => '/tasks/testing#ok'
url_for controller: 'tasks', action: 'testing', trailing_slash: true
# => 'http://example.org/tasks/testing/'
url_for controller: 'tasks', action: 'testing', host: 'example.org', number: '33'
# => 'http://example.org/tasks/testing?number=33'
url_for controller: 'tasks', action: 'testing', host: 'example.org',
script_name: "/myapp"
# => 'http://example.org/myapp/tasks/testing'
url_for controller: 'tasks', action: 'testing', host: 'example.org',
script_name: "/myapp", only_path: true
# => '/myapp/tasks/testing'最后更新于