Skip to content

Commit

Permalink
Updated mails body
Browse files Browse the repository at this point in the history
  • Loading branch information
s2j1h committed Oct 18, 2010
1 parent af52604 commit 5735127
Show file tree
Hide file tree
Showing 6 changed files with 547 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/controllers/user_sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def new
def create
@user_session = UserSession.new(params[:user_session])
if @user_session.save
flash[:notice] = "Successfully logged in."
flash[:notice] = "Successfully logged in."
redirect_back_or_default :controller => "identities",:action => "index"
else
render :action => 'new'
Expand Down
10 changes: 10 additions & 0 deletions app/models/notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,14 @@ def new_user(user)
@sent_on = Time.now
@body[:user] = user
end

def connection(user)
@recipients = user.email
@from = 'vauban@zeneffy.fr'
@subject = "Connection to your Vauban account"
@sent_on = Time.now
@body[:user] = user
end


end
20 changes: 12 additions & 8 deletions app/views/notifier/feedback.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
Dear site administrator,
<h1>Feedback from users</h1>

<p>Dear site administrator,</p>
<p>
You're lucky today, you've got feedback from your users:

Subject: <%=h @feedback.subject %>
User's email: <%=h @feedback.email %>
Sent at: <%= Time.now %>

Comment:
<%=h @feedback.comment %>
</p>
<p>
<b>Subject</b>: <%=h @feedback.subject %>
<b>User's email</b>: <%=h @feedback.email %>
<b>Sent at</b>: <%= Time.now %>
</br>
<b>Comment:</b></br>
<%=h @feedback.comment %>
</p>
14 changes: 9 additions & 5 deletions app/views/notifier/new_user.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
Dear site administrator,
<h1>New user</h1>

<p>Dear site administrator,</p>
<p>
You're lucky today, you've got a new user!

User: <%=h @user.username %>
User's email: <%=h @user.email %>
Registered at: <%= Time.now %>
</p>
<p>
<b>User</b>: <%=h @user.username %>
<b>User's email</b>: <%=h @user.email %>
<b>Registered at</b>: <%= Time.now %>
</p>
Binary file modified db/development.sqlite3
Binary file not shown.

0 comments on commit 5735127

Please sign in to comment.