diff --git a/app/assets/images/user-display.png b/app/assets/images/user-display.png new file mode 100644 index 0000000..3a9dd90 Binary files /dev/null and b/app/assets/images/user-display.png differ diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index c45d37e..3f77781 100755 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -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 diff --git a/app/models/user.rb b/app/models/user.rb index 3f0dd87..24b8860 100755 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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 diff --git a/app/views/dashboard/home.html.erb b/app/views/dashboard/home.html.erb index e69de29..b6146bf 100644 --- a/app/views/dashboard/home.html.erb +++ b/app/views/dashboard/home.html.erb @@ -0,0 +1,55 @@ +
+ +
+ +
+
+
+
+
+ Blog posts with picture +
+
+
+
+
+
+ +
+
+ +
+

+ 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. +

+

Read more

+
+
+
+
+

+

+ by Srinu + | Mar 16th, 2013 + | 7 Comments + | 48 Shares + | Tags : Sandy + Baswa + Lorem + Sinu +

+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index fb4d341..366c7b5 100755 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -4,7 +4,7 @@ RailsGoat <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %> - <%#= csrf_meta_tags %> + <%= csrf_meta_tags %>