vrfs152: moved generate_signup_url into invited_user
This commit is contained in:
parent
4a1ebb7630
commit
e839c8cb69
|
|
@ -48,7 +48,8 @@ module JamRuby
|
|||
end
|
||||
|
||||
def generate_signup_url(invited_user)
|
||||
"http://www.jamkazam.com/signup?invitation_code=#{invited_user.invitation_code}"
|
||||
invited_user.generate_signup_url
|
||||
# "http://www.jamkazam.com/signup?invitation_code=#{invited_user.invitation_code}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -62,6 +62,15 @@ module JamRuby
|
|||
def invited_by_administrator?
|
||||
sender.nil? || sender.admin # a nil sender can only be created by someone using jam-admin
|
||||
end
|
||||
|
||||
def generate_signup_url
|
||||
if 'development'==Rails.env
|
||||
"http://jamkazamdev.local:3000/signup?invitation_code=#{self.invitation_code}"
|
||||
else
|
||||
"http://www.jamkazam.com/signup?invitation_code=#{self.invitation_code}"
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def can_invite?
|
||||
|
|
|
|||
Loading…
Reference in New Issue