Created
September 14, 2010 20:29
-
-
Save imajes/579714 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def interested_in_reply | |
@message = Message.find_by_id(params[:id]) | |
sender_email = User.find_by_id(@message.sender_id).profile.email | |
desc = @message.automatic_description_for_all_types(@message.post_type,@message.post_id) | |
if @message.is_interested==false | |
@message.is_interested=1 | |
@message.save | |
Mailer.deliver_interested_reply_to_mail(sender_email, @message, desc) | |
render :nothing => true, :text => "You have replied that you have interest in his #{@message.post_type}.",:layout =>"main" | |
else | |
render :nothing => true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment