Routes error page, users controller
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class ErrorsController < ApplicationController
|
||||
def routing
|
||||
render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
class UserController < ApplicationController
|
||||
def register
|
||||
|
||||
data = Invite.where(:email => params[:email], :code => params[:code]).first
|
||||
|
||||
unless data.nil?
|
||||
@code = data.code
|
||||
else
|
||||
redirect_to '/'
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -5,5 +5,5 @@ class Invite
|
||||
key :referer, Integer
|
||||
key :email, String
|
||||
key :code, String
|
||||
key :senton, Date
|
||||
key :date, Date
|
||||
end
|
||||
Reference in New Issue
Block a user