added email validation and tthen saved any params they were entering during signup in an @user object
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
@@ -12,7 +12,7 @@ class UsersController < ApplicationController
|
||||
session[:id] = user.id
|
||||
redirect_to home_dashboard_index_path
|
||||
else
|
||||
@user = User.new
|
||||
@user = user
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,6 +4,7 @@ class User < ActiveRecord::Base
|
||||
validates_presence_of :password, :on => :create
|
||||
validates_presence_of :email
|
||||
validates_uniqueness_of :email
|
||||
validates_format_of :email, :with => /.+@.+\..+/i
|
||||
|
||||
def self.authenticate(email, password)
|
||||
auth = nil
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<div class="dashboard-wrapper">
|
||||
|
||||
<div class="main-container">
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
<div class="widget no-margin">
|
||||
<div class="widget-header">
|
||||
<div class="title">
|
||||
<span class="fs1" aria-hidden="true" data-icon=""></span> Blog posts with picture
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget-body">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h4><strong><a href="#">Post of the Day</a></strong></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
<a href="#" class="thumbnail">
|
||||
<img src="<%= image_path("user-display.png") %>" alt="" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="span8">
|
||||
<p>
|
||||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
|
||||
</p>
|
||||
<p><a class="btn btn-info" href="#">Read more</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<p></p>
|
||||
<p class="icomoon-small">
|
||||
<span class="fs1" aria-hidden="true" data-icon=""></span> by <a href="#">Srinu</a>
|
||||
| <span class="fs1" aria-hidden="true" data-icon=""></span> Mar 16th, 2013
|
||||
| <span class="fs1" aria-hidden="true" data-icon=""></span> <a href="#">7 Comments</a>
|
||||
| <span class="fs1" aria-hidden="true" data-icon=""></span> <a href="#">48 Shares</a>
|
||||
| <span class="fs1" aria-hidden="true" data-icon=""></span> Tags : <a href="#"><span class="label label-info">Sandy</span></a>
|
||||
<a href="#"><span class="label label-important">Baswa</span></a>
|
||||
<a href="#"><span class="label label-success">Lorem</span></a>
|
||||
<a href="#"><span class="label label-warning">Sinu</span></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -4,7 +4,7 @@
|
||||
<title>RailsGoat</title>
|
||||
<%= stylesheet_link_tag "application", :media => "all" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%#= csrf_meta_tags %> <!-- <~ What is this for? I hear it helps w/ JS and Sea-surfing.....whatevz -->
|
||||
<%= csrf_meta_tags %> <!-- <~ What is this for? I hear it helps w/ JS and Sea-surfing.....whatevz -->
|
||||
|
||||
<script type="text/javascript" src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<!--[if lte IE 7]>
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
Extras
|
||||
</a>
|
||||
<ul>
|
||||
<li>
|
||||
<li id="guard">
|
||||
<%= link_to "Guard", guard_tutorials_path %>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
</div>
|
||||
<div class="accordion-body in collapse" id="collapseOne" style="height: auto;">
|
||||
<div class="accordion-inner">
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor
|
||||
<p>
|
||||
Application functions related to authentication and session management are often not implemented correctly, allowing attackers to compromise passwords, keys, session tokens, or exploit other implementation flaws to assume other users’ identities.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,9 +19,11 @@
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function openSub(){
|
||||
$('li[id="submenu"]').addClass('open');
|
||||
};
|
||||
|
||||
$(document).ready(openSub);
|
||||
|
||||
</script>
|
||||
@@ -20,7 +20,9 @@
|
||||
</div>
|
||||
<div class="accordion-body in collapse" id="collapseOne" style="height: auto;">
|
||||
<div class="accordion-inner">
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor
|
||||
<p>
|
||||
Injection flaws, such as SQL, OS, and LDAP injection, occur when untrusted data is sent to an interpreter as part of a command or query. The attacker’s hostile data can trick the interpreter into executing unintended commands or accessing unauthorized data.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="accordion-body in collapse" id="collapseOne" style="height: auto;">
|
||||
<div class="accordion-inner">
|
||||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor
|
||||
<p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user