From 08ce46e7eda692342a816aaf8b194a0c45795671 Mon Sep 17 00:00:00 2001 From: Sam <sam.saffron@gmail.com> Date: Wed, 1 May 2013 10:52:31 +1000 Subject: [PATCH] :s/POST/REPLY/g --- app/models/user_action.rb | 4 ++-- app/models/user_action_observer.rb | 2 +- config/locales/client.en.yml | 2 +- spec/models/user_action_spec.rb | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/models/user_action.rb b/app/models/user_action.rb index a281bcbb967..8c4cdcc8dee 100644 --- a/app/models/user_action.rb +++ b/app/models/user_action.rb @@ -11,7 +11,7 @@ class UserAction < ActiveRecord::Base WAS_LIKED = 2 BOOKMARK = 3 NEW_TOPIC = 4 - POST = 5 + REPLY = 5 RESPONSE= 6 MENTION = 7 QUOTE = 9 @@ -25,7 +25,7 @@ class UserAction < ActiveRecord::Base GOT_PRIVATE_MESSAGE, BOOKMARK, NEW_TOPIC, - POST, + REPLY, RESPONSE, LIKE, WAS_LIKED, diff --git a/app/models/user_action_observer.rb b/app/models/user_action_observer.rb index a4e85bc83d2..a4315840d37 100644 --- a/app/models/user_action_observer.rb +++ b/app/models/user_action_observer.rb @@ -79,7 +79,7 @@ class UserActionObserver < ActiveRecord::Observer return if model.post_number == 1 row = { - action_type: UserAction::POST, + action_type: UserAction::REPLY, user_id: model.user_id, acting_user_id: model.user_id, target_post_id: model.id, diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index c61f7bcf9ce..5103fd55fb4 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -72,7 +72,7 @@ en: "2": "Likes Received" "3": "Bookmarks" "4": "Topics" - "5": "Posts" + "5": "Replies" "6": "Responses" "7": "Mentions" "9": "Quotes" diff --git a/spec/models/user_action_spec.rb b/spec/models/user_action_spec.rb index 84be5c8748c..8782ffdf096 100644 --- a/spec/models/user_action_spec.rb +++ b/spec/models/user_action_spec.rb @@ -162,7 +162,7 @@ describe UserAction do end 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 @@ -174,7 +174,7 @@ describe UserAction do end 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 @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 @@ -183,7 +183,7 @@ describe UserAction do it 'should not log a double notification for a post edit' do @response.raw = "here it goes again" @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