def show
self.resource = resource_class.confirm_by_token(params[:confirmation_token])
# resource.skip_pass_presence = true
if resource.errors.empty?
set_flash_message(:notice, :confirmed) if is_navigational_format?
sign_in(resource_name, resource) if !signed_in?
respond_with_navigational(resource){ redirect_to main_pages_path, :flash => { :notice => I18n.t('.devise.confirmations.confirmed')} }
else
respond_with_navigational(resource){ redirect_to root_path, :flash => {:error => resource.errors.full_messages.first }}
end
end