Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Final Recovery

  • Loading branch information...
commit dc0117a3b75b34840778e1f498bc733501cb987e 1 parent 7bfb16b
@florida authored
View
19 app/controllers/sessions_controller.rb
@@ -1,19 +0,0 @@
-class SessionsController < ApplicationController
- def new
- end
-
- def create
- user = login(params[:email], params[:password], params[:remember_me])
- if user
- redirect_back_or_to root_url, :notice => "Logged in!"
- end
- flash.now.alert = "Email or Password was invalid"
- render :new
- end
-
- def destroy
- logout
- redirect_to root_url, :notice => "Logged Out!"
- end
-
-end
View
15 app/controllers/users_controller.rb
@@ -1,15 +0,0 @@
-class UsersController < ApplicationController
- def new
- @user = User.new
- end
-
- def create
- @user = User.new(params[:user])
- if @user.save
- redirect_to root_url, :notice => "Signed Up"
-
- else
- render :new
- end
- end
-end
View
2  app/helpers/sessions_helper.rb
@@ -1,2 +0,0 @@
-module SessionsHelper
-end
View
20 app/views/layouts/application.html.erb
@@ -44,27 +44,7 @@
</footer>
-<<<<<<< HEAD
-=======
-<header>
- <ul>
- <li><%= link_to 'Orders', admin_orders_path %></li>
- <li><%= link_to 'Products', admin_products_path %></li>
- <li></li>
- </ul>
-
-
-</header>
->>>>>>> 67c8ddd50d72f6ef054cabcf9360d7e6eccf2705
-
-
-<section id="container">
- <% flash.each do |name,msg| %>
- <%= content_tag :section, msg, :id => "flash_#{name}" %>
- <% end %>
- <%= yield %>
-</section>
</body>
</html>
View
18 app/views/sessions/new.html.erb
@@ -1,18 +0,0 @@
-<%= form_tag sessions_path do %>
- <section class="field">
- <% label_tag :email %>
- <% text_field_tag :email, params [:email] %>
-
- </section>
- <section class="field">
- <%= label_tag :password %>
- <%= password_field_tag :password %>
- </section>
- <section class="field">
- <%= check_box_tag :remember_me, 1, params[:remember_me]%>
- <%= label_tag :remember_me %>
- </section>
- <section class="actions">
- <%= submit_tag "Log in" %>
- </section>
-<% end %>
View
29 app/views/users/new.html.erb
@@ -1,29 +0,0 @@
-<%= form_for @user do |f| %>
- <% if @user.errors.any? %>
- <section class="error_messages">
- <h2>Form is invalid </h2>
- <ul>
- <% for message in @user.errors.full_messages %>
- <li><%= message %></li>
- <% end %>
- </ul>
- </section>
- <% end %>
-
- <section class="field">
- <%= f.label :email %>
- <%= f.text_field :email%>
- </section>
- <section class="field">
- <%= f.label :password %>
- <%= f.password_field :password %>
- </section>
- <section class="field">
- <%= f.label :password_confirmation %>
- <%= f.password_field :password_confirmation %>
- </section>
-
- <section class="actions">
- <%= f.submit %>
- </section>
-<% end %>
View
12 config/routes.rb
@@ -1,5 +1,4 @@
Elmorfstore::Application.routes.draw do
-<<<<<<< HEAD
match 'store' => 'store#index', :as => 'store', :via => :get
match 'shoppingcart' => 'store#show_cart', :as => 'shoppingcart', :via => :get
match 'add_to_cart/:id' => 'store#add_to_cart', :as => 'add_to_cart'
@@ -9,15 +8,10 @@
root :to => 'store#index'
namespace :admin do
-=======
- # root :to => "store#index"
-
- namespace :admin do
- resources :orders, :products
- end
-
->>>>>>> 67c8ddd50d72f6ef054cabcf9360d7e6eccf2705
resources :orders, :products
+end
+
+resources :orders, :products
# The priority is based upon order of creation:
# first created -> highest priority.
Please sign in to comment.
Something went wrong with that request. Please try again.