Initial stab at check-in feature

This commit is contained in:
Jason Denney
2013-05-19 15:43:44 -04:00
parent c504252541
commit d7755f00ed
8 changed files with 147 additions and 1 deletions
+6
View File
@@ -221,3 +221,9 @@ Devise.setup do |config|
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
# end
end
#Check in the user if they sign in. (Devise uses Warden)
Warden::Manager.after_authentication do |user,auth,opts|
user.checkin unless user.checked_in?
end
+9
View File
@@ -4,4 +4,13 @@ Velocipede::Application.routes.draw do
netzke
root :to => 'site#index'
###########################
# API Routes
scope 'api', :module => :api do
scope 'v1', :module => :v1 do
post 'checkin' => "logs#checkin", :as => "api_checkin"
post 'checkout' => "logs#checkout", :as => "api_checkout"
end
end
end