Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing db column name

  • Loading branch information...
commit eed6402712f16932183260c34dee4a99d075a4b1 1 parent 8e7a0b9
@griggsk griggsk authored
View
2  app/controllers/message_posts_controller.rb
@@ -110,7 +110,7 @@ def stop_following
posts = @message_post.posts_with_followers
posts.each do |post|
if post.user == current_user
- post.update_attribute(:email_forum_activity, 0)
+ post.update_attribute(:to_user_id, 0)
end
end
respond_to do |format|
View
4 app/models/message_post.rb
@@ -79,8 +79,8 @@ def most_recent_reply_post_time
end
def posts_with_followers
- posts = self.child_posts.find :all, :conditions=>'email_forum_activity = 1', :include => :user
- if(self.email_forum_activity)
+ posts = self.child_posts.find :all, :conditions=>'to_user_id = 1', :include => :user
+ if(self.to_user_id)
posts << self
end
return posts
View
2  app/models/user.rb
@@ -90,7 +90,7 @@ def forums
end
def following_posts
- return self.message_posts.find :all, :conditions=>'email_forum_activity = 1'
+ return self.message_posts.find :all, :conditions=>'to_user_id = 1'
end
def deliver_password_reset_instructions!
View
2  app/views/message_posts/_message_form.html.erb
@@ -7,7 +7,7 @@
<%= f.hidden_field(:forum_id) %>
<%= f.hidden_field(:thread_id) %>
<%if( !message_post.new_record? || !@followers.include?(current_user) )%>
- <p>Email updates to me: <%= f.check_box :email_forum_activity, :value => 1 %></p>
+ <p>Email updates to me: <%= f.check_box :to_user_id, :value => 1 %></p>
<%end%>
<p>Subject: <%= f.text_field :subject %></p>
<p><%= f.text_area :body, :cols => 60, :rows => 10 %></p>
Please sign in to comment.
Something went wrong with that request. Please try again.