Routes error page, users controller

This commit is contained in:
magnolia-fan
2011-04-13 05:59:45 +04:00
parent b7abe9a1d3
commit 1e01c6cf7d
4 changed files with 22 additions and 56 deletions
+5
View File
@@ -0,0 +1,5 @@
class ErrorsController < ApplicationController
def routing
render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false
end
end
+12
View File
@@ -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
+1 -1
View File
@@ -5,5 +5,5 @@ class Invite
key :referer, Integer
key :email, String
key :code, String
key :senton, Date
key :date, Date
end