Merged more conflicts
This commit is contained in:
parent
d3b8ad7222
commit
0bc5858101
3
Gemfile
3
Gemfile
|
@ -23,13 +23,10 @@ end
|
||||||
|
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
gem 'devise'
|
gem 'devise'
|
||||||
|
|
||||||
gem "cancan"
|
gem "cancan"
|
||||||
|
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
# To use ActiveModel has_secure_password
|
# To use ActiveModel has_secure_password
|
||||||
# gem 'bcrypt-ruby', '~> 3.0.0'
|
# gem 'bcrypt-ruby', '~> 3.0.0'
|
||||||
|
|
||||||
|
|
18
Gemfile.lock
18
Gemfile.lock
|
@ -29,13 +29,8 @@ GEM
|
||||||
i18n (~> 0.6)
|
i18n (~> 0.6)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
arel (3.0.2)
|
arel (3.0.2)
|
||||||
<<<<<<< HEAD
|
|
||||||
builder (3.0.0)
|
|
||||||
=======
|
|
||||||
bcrypt-ruby (3.0.1)
|
|
||||||
builder (3.0.0)
|
builder (3.0.0)
|
||||||
cancan (1.6.8)
|
cancan (1.6.8)
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
coffee-rails (3.2.2)
|
coffee-rails (3.2.2)
|
||||||
coffee-script (>= 2.2.0)
|
coffee-script (>= 2.2.0)
|
||||||
railties (~> 3.2.0)
|
railties (~> 3.2.0)
|
||||||
|
@ -43,14 +38,11 @@ GEM
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.3.3)
|
coffee-script-source (1.3.3)
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
devise (2.1.1)
|
devise (2.1.1)
|
||||||
bcrypt-ruby (~> 3.0)
|
bcrypt-ruby (~> 3.0)
|
||||||
orm_adapter (~> 0.1)
|
orm_adapter (~> 0.1)
|
||||||
railties (~> 3.1)
|
railties (~> 3.1)
|
||||||
warden (~> 1.2.1)
|
warden (~> 1.2.1)
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (1.4.0)
|
execjs (1.4.0)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
|
@ -68,10 +60,7 @@ GEM
|
||||||
treetop (~> 1.4.8)
|
treetop (~> 1.4.8)
|
||||||
mime-types (1.19)
|
mime-types (1.19)
|
||||||
multi_json (1.3.6)
|
multi_json (1.3.6)
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
orm_adapter (0.1.0)
|
orm_adapter (0.1.0)
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
polyglot (0.3.3)
|
polyglot (0.3.3)
|
||||||
rack (1.4.1)
|
rack (1.4.1)
|
||||||
rack-cache (1.2)
|
rack-cache (1.2)
|
||||||
|
@ -119,23 +108,16 @@ GEM
|
||||||
uglifier (1.2.7)
|
uglifier (1.2.7)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
multi_json (~> 1.3)
|
multi_json (~> 1.3)
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
warden (1.2.1)
|
warden (1.2.1)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
<<<<<<< HEAD
|
|
||||||
coffee-rails (~> 3.2.1)
|
|
||||||
=======
|
|
||||||
cancan
|
cancan
|
||||||
coffee-rails (~> 3.2.1)
|
coffee-rails (~> 3.2.1)
|
||||||
devise
|
devise
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
jquery-rails
|
jquery-rails
|
||||||
json
|
json
|
||||||
rails (= 3.2.3)
|
rails (= 3.2.3)
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
class DoorLogsController < ApplicationController
|
class DoorLogsController < ApplicationController
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
authorize_resource
|
authorize_resource
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
|
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
# GET /door_logs
|
# GET /door_logs
|
||||||
# GET /door_logs.json
|
# GET /door_logs.json
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
class UsersController < ApplicationController
|
class UsersController < ApplicationController
|
||||||
<<<<<<< HEAD
|
|
||||||
# GET /users
|
|
||||||
# GET /users.json
|
|
||||||
def index
|
|
||||||
@users = User.all
|
|
||||||
=======
|
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
|
|
||||||
|
@ -13,7 +7,6 @@ class UsersController < ApplicationController
|
||||||
def index
|
def index
|
||||||
#@users = User.all
|
#@users = User.all
|
||||||
#authorize! :read, @users
|
#authorize! :read, @users
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # index.html.erb
|
format.html # index.html.erb
|
||||||
|
@ -24,11 +17,7 @@ class UsersController < ApplicationController
|
||||||
# GET /users/1
|
# GET /users/1
|
||||||
# GET /users/1.json
|
# GET /users/1.json
|
||||||
def show
|
def show
|
||||||
<<<<<<< HEAD
|
|
||||||
@user = User.find(params[:id])
|
|
||||||
=======
|
|
||||||
#@user = User.find(params[:id])
|
#@user = User.find(params[:id])
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # show.html.erb
|
format.html # show.html.erb
|
||||||
|
@ -38,11 +27,7 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
# PUT /users/1/upload
|
# PUT /users/1/upload
|
||||||
def upload
|
def upload
|
||||||
<<<<<<< HEAD
|
|
||||||
@user = User.find(params[:id])
|
|
||||||
=======
|
|
||||||
#@user = User.find(params[:id])
|
#@user = User.find(params[:id])
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
@upload_result = @user.upload_to_door
|
@upload_result = @user.upload_to_door
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
@ -64,11 +49,7 @@ class UsersController < ApplicationController
|
||||||
# GET /users/new
|
# GET /users/new
|
||||||
# GET /users/new.json
|
# GET /users/new.json
|
||||||
def new
|
def new
|
||||||
<<<<<<< HEAD
|
|
||||||
@user = User.new
|
|
||||||
=======
|
|
||||||
#@user = User.new
|
#@user = User.new
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # new.html.erb
|
format.html # new.html.erb
|
||||||
|
@ -78,21 +59,13 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
# GET /users/1/edit
|
# GET /users/1/edit
|
||||||
def edit
|
def edit
|
||||||
<<<<<<< HEAD
|
|
||||||
@user = User.find(params[:id])
|
|
||||||
=======
|
|
||||||
#@user = User.find(params[:id])
|
#@user = User.find(params[:id])
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# POST /users
|
# POST /users
|
||||||
# POST /users.json
|
# POST /users.json
|
||||||
def create
|
def create
|
||||||
<<<<<<< HEAD
|
|
||||||
@user = User.new(params[:user])
|
|
||||||
=======
|
|
||||||
#@user = User.new(params[:user])
|
#@user = User.new(params[:user])
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @user.save
|
if @user.save
|
||||||
|
@ -108,11 +81,7 @@ class UsersController < ApplicationController
|
||||||
# PUT /users/1
|
# PUT /users/1
|
||||||
# PUT /users/1.json
|
# PUT /users/1.json
|
||||||
def update
|
def update
|
||||||
<<<<<<< HEAD
|
|
||||||
@user = User.find(params[:id])
|
|
||||||
=======
|
|
||||||
#@user = User.find(params[:id])
|
#@user = User.find(params[:id])
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @user.update_attributes(params[:user])
|
if @user.update_attributes(params[:user])
|
||||||
|
@ -128,11 +97,7 @@ class UsersController < ApplicationController
|
||||||
# DELETE /users/1
|
# DELETE /users/1
|
||||||
# DELETE /users/1.json
|
# DELETE /users/1.json
|
||||||
def destroy
|
def destroy
|
||||||
<<<<<<< HEAD
|
|
||||||
@user = User.find(params[:id])
|
|
||||||
=======
|
|
||||||
#@user = User.find(params[:id])
|
#@user = User.find(params[:id])
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
@user.destroy
|
@user.destroy
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
class User < ActiveRecord::Base
|
class User < ActiveRecord::Base
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
# Include default devise modules. Others available are:
|
# Include default devise modules. Others available are:
|
||||||
# :token_authenticatable, :confirmable,
|
# :token_authenticatable, :confirmable,
|
||||||
# :lockable, :timeoutable and :omniauthable
|
# :lockable, :timeoutable and :omniauthable
|
||||||
|
@ -9,7 +7,6 @@ class User < ActiveRecord::Base
|
||||||
|
|
||||||
# Setup accessible (or protected) attributes for your model
|
# Setup accessible (or protected) attributes for your model
|
||||||
attr_accessible :email, :password, :password_confirmation, :remember_me
|
attr_accessible :email, :password, :password_confirmation, :remember_me
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
require 'open-uri'
|
require 'open-uri'
|
||||||
|
|
||||||
attr_accessible :card_id, :card_number, :card_permissions, :name
|
attr_accessible :card_id, :card_number, :card_permissions, :name
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
<<<<<<< HEAD
|
|
||||||
<p id="notice"><%= notice %></p>
|
|
||||||
=======
|
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Download results:</b>
|
<b>Download results:</b>
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
<<<<<<< HEAD
|
|
||||||
<p id="notice"><%= notice %></p>
|
|
||||||
=======
|
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Key:</b>
|
<b>Key:</b>
|
||||||
|
|
|
@ -10,15 +10,11 @@
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<a href="/users">Users</a>
|
<a href="/users">Users</a>
|
||||||
<a href="/door_logs">Logs</a>
|
<a href="/door_logs">Logs</a>
|
||||||
<<<<<<< HEAD
|
|
||||||
</div>
|
|
||||||
=======
|
|
||||||
<%= link_to 'Profile', edit_user_registration_path if user_signed_in? %>
|
<%= link_to 'Profile', edit_user_registration_path if user_signed_in? %>
|
||||||
<%= link_to 'Sign out', destroy_user_session_path, :method => :delete if user_signed_in? %>
|
<%= link_to 'Sign out', destroy_user_session_path, :method => :delete if user_signed_in? %>
|
||||||
</div>
|
</div>
|
||||||
<p class="notice"><%= notice %></p>
|
<p class="notice"><%= notice %></p>
|
||||||
<p class="alert"><%= alert %></p>
|
<p class="alert"><%= alert %></p>
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
<<<<<<< HEAD
|
|
||||||
<p id="notice"><%= notice %></p>
|
|
||||||
=======
|
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Name:</b>
|
<b>Name:</b>
|
||||||
|
@ -23,10 +19,6 @@
|
||||||
<%= @user.card_permissions %>
|
<%= @user.card_permissions %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<%= link_to 'Upload to Door', upload_path(user) %>
|
|
||||||
=======
|
|
||||||
<%= link_to 'Upload to Door', upload_path(@user) %>
|
<%= link_to 'Upload to Door', upload_path(@user) %>
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
<%= link_to 'Edit', edit_user_path(@user) %> |
|
<%= link_to 'Edit', edit_user_path(@user) %> |
|
||||||
<%= link_to 'Back', users_path %>
|
<%= link_to 'Back', users_path %>
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
<<<<<<< HEAD
|
|
||||||
<p id="notice"><%= notice %></p>
|
|
||||||
=======
|
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
<% if @upload_result %>
|
<% if @upload_result %>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
<<<<<<< HEAD
|
|
||||||
<p id="notice"><%= notice %></p>
|
|
||||||
=======
|
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Upload results:</b>
|
<b>Upload results:</b>
|
||||||
|
|
|
@ -34,9 +34,6 @@ Dooraccess::Application.configure do
|
||||||
|
|
||||||
# Expands the lines which load the assets
|
# Expands the lines which load the assets
|
||||||
config.assets.debug = true
|
config.assets.debug = true
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,12 +14,8 @@ Dooraccess::Application.configure do
|
||||||
# Compress JavaScripts and CSS
|
# Compress JavaScripts and CSS
|
||||||
config.assets.compress = true
|
config.assets.compress = true
|
||||||
|
|
||||||
# Don't fallback to assets pipeline if a precompiled asset is missed
|
# Fallback to assets pipeline if a precompiled asset is missed
|
||||||
<<<<<<< HEAD
|
|
||||||
config.assets.compile = false
|
|
||||||
=======
|
|
||||||
config.assets.compile = true
|
config.assets.compile = true
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
# Generate digests for assets URLs
|
# Generate digests for assets URLs
|
||||||
config.assets.digest = true
|
config.assets.digest = true
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
Dooraccess::Application.routes.draw do
|
Dooraccess::Application.routes.draw do
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
devise_for :users
|
devise_for :users
|
||||||
|
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
match 'users/upload_all' => 'users#upload_all', :as => :upload_all
|
match 'users/upload_all' => 'users#upload_all', :as => :upload_all
|
||||||
resources :users
|
resources :users
|
||||||
match 'users/:id/upload' => 'users#upload', :as => :upload
|
match 'users/:id/upload' => 'users#upload', :as => :upload
|
||||||
|
@ -12,11 +9,8 @@ Dooraccess::Application.routes.draw do
|
||||||
match 'door_logs/download' => 'door_logs#download', :as => :download
|
match 'door_logs/download' => 'door_logs#download', :as => :download
|
||||||
resources :door_logs
|
resources :door_logs
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
root :to => "home#index"
|
root :to => "home#index"
|
||||||
|
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
# The priority is based upon order of creation:
|
# The priority is based upon order of creation:
|
||||||
# first created -> highest priority.
|
# first created -> highest priority.
|
||||||
|
|
||||||
|
|
11
db/schema.rb
11
db/schema.rb
|
@ -10,11 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
ActiveRecord::Schema.define(:version => 20120825041626) do
|
|
||||||
=======
|
|
||||||
ActiveRecord::Schema.define(:version => 20120904024426) do
|
ActiveRecord::Schema.define(:version => 20120904024426) do
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
|
|
||||||
create_table "door_logs", :force => true do |t|
|
create_table "door_logs", :force => true do |t|
|
||||||
t.string "key"
|
t.string "key"
|
||||||
|
@ -28,12 +24,6 @@ ActiveRecord::Schema.define(:version => 20120904024426) do
|
||||||
t.integer "card_id"
|
t.integer "card_id"
|
||||||
t.string "card_number"
|
t.string "card_number"
|
||||||
t.integer "card_permissions"
|
t.integer "card_permissions"
|
||||||
<<<<<<< HEAD
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
=======
|
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.string "email", :default => "", :null => false
|
t.string "email", :default => "", :null => false
|
||||||
|
@ -52,5 +42,4 @@ ActiveRecord::Schema.define(:version => 20120904024426) do
|
||||||
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
||||||
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
|
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
|
||||||
|
|
||||||
>>>>>>> 03d99741e5b661e63f6281115d2db333082a09b1
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user