Instead of hard-coding the scheme and host everywhere, use _path methods to show relative URLs. Except that our previous setting of Rails.application.routes.default_url_options in config.after_initialize made this moot because Rails inserts that host into all _path helpers for some reason. So revert that setting. But then anything that wants an absolute URL doesn't know the hostname and the root_url helper throws an exception. So make a Rails.application.root_url shortcut to pass the per-app settings in Rails.application to root_url. Now we can just use _path helpers most places but still use _url ones where we need them, such as in RSS views and e-mail templates.
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
<div class="box wide">
|
|
<div class="legend">
|
|
Request an Invitation
|
|
</div>
|
|
|
|
<p>
|
|
If you don't know (or can't find) an <a href="/u/">existing user</a> from
|
|
whom to request an invitation, you can make a public request for one. This
|
|
will display your name and memo to all other logged-in users who can then
|
|
send you an invitation if they recognize you.
|
|
</p>
|
|
|
|
<p>
|
|
Your e-mail address must be valid and confirmed by visiting a URL e-mailed to
|
|
you before your request will be displayed. Your e-mail address will not be
|
|
shown to any other users (except moderators).
|
|
</p>
|
|
|
|
<%= form_for @invitation_request,
|
|
:url => create_invitation_by_request_path do |f| %>
|
|
<p>
|
|
<%= f.label :name, "Name:" %>
|
|
<%= f.text_field :name, :size => 30 %>
|
|
<br />
|
|
|
|
<%= f.label :email, "E-mail Address:" %>
|
|
<%= f.text_field :email, :size => 30 %>
|
|
<br />
|
|
|
|
<%= f.label :memo, "URL:" %>
|
|
<%= f.text_field :memo, :size => 30 %>
|
|
<br />
|
|
<label></label>
|
|
<span class="na">URL to verify you (Personal website, Github account,
|
|
etc.)</span>
|
|
</p>
|
|
|
|
<p>
|
|
<%= submit_tag "Request Invitation" %>
|
|
</p>
|
|
<% end %>
|
|
</div>
|