:s/POST/REPLY/g

This commit is contained in:
Sam 2013-05-01 10:52:31 +10:00
parent fc07fcbd9d
commit 08ce46e7ed
4 changed files with 7 additions and 7 deletions

View File

@ -11,7 +11,7 @@ class UserAction < ActiveRecord::Base
WAS_LIKED = 2 WAS_LIKED = 2
BOOKMARK = 3 BOOKMARK = 3
NEW_TOPIC = 4 NEW_TOPIC = 4
POST = 5 REPLY = 5
RESPONSE= 6 RESPONSE= 6
MENTION = 7 MENTION = 7
QUOTE = 9 QUOTE = 9
@ -25,7 +25,7 @@ class UserAction < ActiveRecord::Base
GOT_PRIVATE_MESSAGE, GOT_PRIVATE_MESSAGE,
BOOKMARK, BOOKMARK,
NEW_TOPIC, NEW_TOPIC,
POST, REPLY,
RESPONSE, RESPONSE,
LIKE, LIKE,
WAS_LIKED, WAS_LIKED,

View File

@ -79,7 +79,7 @@ class UserActionObserver < ActiveRecord::Observer
return if model.post_number == 1 return if model.post_number == 1
row = { row = {
action_type: UserAction::POST, action_type: UserAction::REPLY,
user_id: model.user_id, user_id: model.user_id,
acting_user_id: model.user_id, acting_user_id: model.user_id,
target_post_id: model.id, target_post_id: model.id,

View File

@ -72,7 +72,7 @@ en:
"2": "Likes Received" "2": "Likes Received"
"3": "Bookmarks" "3": "Bookmarks"
"4": "Topics" "4": "Topics"
"5": "Posts" "5": "Replies"
"6": "Responses" "6": "Responses"
"7": "Mentions" "7": "Mentions"
"9": "Quotes" "9": "Quotes"

View File

@ -162,7 +162,7 @@ describe UserAction do
end end
it 'should not log a post user action' do it 'should not log a post user action' do
@post.user.user_actions.where(action_type: UserAction::POST).first.should be_nil @post.user.user_actions.where(action_type: UserAction::REPLY).first.should be_nil
end end
@ -174,7 +174,7 @@ describe UserAction do
end end
it 'should log user actions correctly' do it 'should log user actions correctly' do
@response.user.user_actions.where(action_type: UserAction::POST).first.should_not be_nil @response.user.user_actions.where(action_type: UserAction::REPLY).first.should_not be_nil
@post.user.user_actions.where(action_type: UserAction::RESPONSE).first.should_not be_nil @post.user.user_actions.where(action_type: UserAction::RESPONSE).first.should_not be_nil
@mentioned.user_actions.where(action_type: UserAction::MENTION).first.should_not be_nil @mentioned.user_actions.where(action_type: UserAction::MENTION).first.should_not be_nil
@post.user.user_actions.joins(:target_post).where('posts.post_number = 2').count.should == 1 @post.user.user_actions.joins(:target_post).where('posts.post_number = 2').count.should == 1
@ -183,7 +183,7 @@ describe UserAction do
it 'should not log a double notification for a post edit' do it 'should not log a double notification for a post edit' do
@response.raw = "here it goes again" @response.raw = "here it goes again"
@response.save! @response.save!
@response.user.user_actions.where(action_type: UserAction::POST).count.should == 1 @response.user.user_actions.where(action_type: UserAction::REPLY).count.should == 1
end end
end end