fixes #48: Adding email via profile
This commit is contained in:
@@ -28,8 +28,9 @@ class UsersController < ApplicationController
|
|||||||
|
|
||||||
def create
|
def create
|
||||||
@user = User.create(params[:user])
|
@user = User.create(params[:user])
|
||||||
flash[:notice] = "There were errors" if @user.errors.any?
|
if @user.errors.empty?
|
||||||
session[:user_id] = @user.id
|
session[:user_id] = @user.id
|
||||||
|
end
|
||||||
set_current_user
|
set_current_user
|
||||||
respond_with(@user)
|
respond_with(@user)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<% content_for(:secondary_links) do %>
|
<% content_for(:secondary_links) do %>
|
||||||
<menu>
|
<menu>
|
||||||
<li><%= link_to "Listing", users_path %></li>
|
<li><%= link_to "Listing", users_path %></li>
|
||||||
<li><%= link_to "Signup", new_user_path %></li>
|
|
||||||
<% if @user && !@user.new_record? %>
|
<% if @user && !@user.new_record? %>
|
||||||
<li>|</li>
|
<li>|</li>
|
||||||
<li><%= link_to "Edit", edit_user_path(@user) %></li>
|
<li><%= link_to "Edit", edit_user_path(@user) %></li>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<div id="a-new">
|
<div id="a-new">
|
||||||
<h1>Signup</h1>
|
<h1>Signup</h1>
|
||||||
|
|
||||||
|
<% if @user.errors.empty? %>
|
||||||
<div id="p1">
|
<div id="p1">
|
||||||
<p><%= Danbooru.config.app_name %> is ad-sponsored and does not require an account to view. But in order to start uploading, editing, or creating content on this site, you will need to register. <em>Make sure you read and agree to the <%= link_to "terms of service", terms_of_service_path %> before registering. <strong>This site is open to web crawlers, therefore any name you choose will be public!</strong></em></p>
|
<p><%= Danbooru.config.app_name %> is ad-sponsored and does not require an account to view. But in order to start uploading, editing, or creating content on this site, you will need to register. <em>Make sure you read and agree to the <%= link_to "terms of service", terms_of_service_path %> before registering. <strong>This site is open to web crawlers, therefore any name you choose will be public!</strong></em></p>
|
||||||
|
|
||||||
@@ -59,7 +60,10 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div id="p3">
|
||||||
<%= simple_form_for(@user) do |f| %>
|
<%= simple_form_for(@user) do |f| %>
|
||||||
<%= f.input :name %>
|
<%= f.input :name %>
|
||||||
<%= f.input :password %>
|
<%= f.input :password %>
|
||||||
|
|||||||
Reference in New Issue
Block a user