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