Skip to content

Commit

Permalink
s2 viral message 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ilankasan committed Oct 31, 2012
1 parent 3c5702e commit f7dd8a3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 143 deletions.
11 changes: 6 additions & 5 deletions app/controllers/activities_controller.rb
Expand Up @@ -15,28 +15,29 @@ class ActivitiesController < ApplicationController

def tiviti_authenticate_account
# puts "---------------------------------------------------------------"
# puts "------->>>>>>>>>>>>>>>> tiviti_authenticate_account"
puts "------->>>>>>>>>>>>>>>> tiviti_authenticate_account"

if(params[:email] != nil)
#render '../my_devise/registrations/new'
#redirect_to sign_up_path_for(User.new)
# puts "email is "+params[:email]
user = User.where(:clone_email => params[:email])
#puts "users = "+user.inspect

@email = params[:email]
puts "email == "+@email
if (user != nil && user[0] != nil && user[0].get_account == nil)
#redirect_to new_registration_path(user[0].get_account)
@account = Account.new()
#puts "account = "+@account.inspect
# puts "---------------------------------------------------------------"
# puts "------------------------- redirect_to new_registration_path --------------------------------------"
redirect_to new_registration_path(@account,:email =>params[:email])
# puts "---------------------------------------------------------------"
return
end
end
# puts "++++++++++++++++++++++++++++++++++++++++++++++(((()()()())))"
authenticate_account!
puts "++++++++++++++++++++++++++++++++++++++++++++++(((()()()())))"
# redirect_to new_account_session_path (user)
authenticate_account!
end # end def

def create
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/my_devise/registrations_controller.rb
Expand Up @@ -7,7 +7,7 @@ class MyDevise::RegistrationsController < Devise::RegistrationsController
def new
puts " new ++++++++++++ registration ++++++++++++++++++++++++++++++++++++++"

@email = params[:email]
@email = params[:email]
if(@email != nil)
puts "Sign up with email "+@email
# flash[:warning] = "Sign up with email "+@email
Expand Down Expand Up @@ -139,7 +139,7 @@ def after_inactive_sign_up_path_for(resource)

puts "in after_inactive_sign_up_path_for"

puts params.inspect
# puts params.inspect
email = params[:account][:email]


Expand Down
9 changes: 8 additions & 1 deletion app/views/devise/sessions/new.html.erb
@@ -1,4 +1,11 @@
<title>tiviti sign up gggg</title>
<title>tiviti sign in</title>

<% puts params.inspect %>
<% if (@email != nil) %>
<div align="center"><font size = "3" color = "black" >To respond to this request you must create a new account</font></div>
<%end%>
<%puts "____________________ilan_______________________________"%>

<div id="sign-in-up-box">

Expand Down
6 changes: 3 additions & 3 deletions app/views/layouts/new.html.erb
@@ -1,12 +1,12 @@
<title>tiviti - Sign Up </title>
<title>tiviti - Sign Up delete this</title>

<div id="sign-in-up-box">
<h1>tiviti</h1>
<%puts "resource= "+resource.inspect%>
<%puts "___________________________________________________"%>
<%puts "___________________delete this??? _ilan_______________________________"%>

<!--%puts "@email= "+@email%-->
<%puts "___________________________________________________"%>
<%puts "_____________________kasan______________________________"%>


<div id="sign-in-up-form">
Expand Down
2 changes: 1 addition & 1 deletion app/views/my_devise/registrations/new.html.erb
Expand Up @@ -4,7 +4,7 @@
<%# message to users they either need to sign in or create an account in order to respond %>
<% if (@email != nil) %>
<div align="center"><font size = "3" color = "black" >To respond to this request you need to sign in or create a new account</font></div>
<div align="center"><font size = "3" color = "black" >To respond to this request you must create a new account</font></div>
<%end%>

<div id="sign-in-up-box">
Expand Down
131 changes: 0 additions & 131 deletions app/views/shared/Copy of _tivit_adp_comment.html.erb

This file was deleted.

0 comments on commit f7dd8a3

Please sign in to comment.