<p><b>@tomhughes</b> requested changes on this pull request.</p>

<p>This is pretty close to being ready to merge I think - just a few minor things to look at first.</p><hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1309#pullrequestreview-3756978">app/views/diary_entry/view.html.erb</a>:</p>
<pre style='color:#555'>> @@ -21,6 +21,11 @@
     <%= richtext_area :diary_comment, :body, :cols => 80, :rows => 15 %>
     <%= submit_tag t('diary_entry.view.save_button') %>
   <% end %>
+  <% if @user and @entry.subscribers and @entry.subscribers.exists?(@user.id) %>
</pre>
<p>There isn't really any need to check <code>@entry.subscribers</code> here as it will always be non-nil as it is an association so will be an association proxy object.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1309#pullrequestreview-3756978">db/migrate/20161002153425_add_join_table_between_users_and_diary_entries.rb</a>:</p>
<pre style='color:#555'>> @@ -0,0 +1,11 @@
+class AddJoinTableBetweenUsersAndDiaryEntries < ActiveRecord::Migration
+  def change
+    create_table :diary_entry_subscriptions, :id => false do |t|
+      t.column :user_id, :bigint, :null => false
+      t.column :diary_entry_id, :bigint, :null => false
+    end
+
+    add_index :diary_entry_subscriptions, [:user_id, :diary_entry_id], :unique => true, :name => "index_diary_subscriptions_on_user_id_and_diary_entry_id"
</pre>
<p>Can we make this <code>add_primary_key</code> please and drop the unique and name options. Also we should add the foreign keys - I think this is right:</p>

<pre><code>add_foreign_key :diary_entry_subscriptions, :diary_entries, :name => "diary_entry_subscriptions_diary_entry_id_fkey"
add_foreign_key :diary_entry_subscriptions, :users, :name => "diary_entry_subscriptions_user_id_fkey"
</code></pre>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1309#pullrequestreview-3756978">test/controllers/diary_entry_controller_test.rb</a>:</p>
<pre style='color:#555'>> @@ -641,6 +662,64 @@ def test_comments
     assert_response :not_found
   end
 
+  def test_subscribe_success
+    diary_entry = create(:diary_entry, :user_id => users(:normal_user).id)
+
+    assert_difference "diary_entry.subscribers.count", 1 do
+      post :subscribe, { :id => diary_entry.id, :display_name => diary_entry.user.display_name }, { :user => users(:public_user).id }
+    end
+    assert_response :redirect
+  end
+
+  def test_subscribe_fail
+    diary_entry = create(:diary_entry, :user_id => users(:normal_user).id)
+
+    # not signed in
+    assert_no_difference "diary_entry.subscribers.count", 1 do
</pre>
<p>I don't think <code>assert_no_difference</code> takes a second argument does it?</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1309#pullrequestreview-3756978">config/locales/en.yml</a>:</p>
<pre style='color:#555'>> @@ -1118,8 +1118,8 @@ en:
       paragraph_1_html: |
         OpenStreetMap has few formal rules but we expect all participants to collaborate
         with, and communicate with, the community. If you are considering
-        any activities other than editing by hand, please read and follow the guidelines on 
-        <a href='http://wiki.openstreetmap.org/wiki/Import/Guidelines'>Imports</a> and 
+        any activities other than editing by hand, please read and follow the guidelines on
</pre>
<p>Can we drop these trailing whitespace changes please...</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1309#pullrequestreview-3756978">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLQU4L3XekKWsQkeaXgLA-6nWf9-cks5qy_PugaJpZM4KNPYt">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLR3d5hnL9fFrBA8O34NrHkuvdGoEks5qy_PugaJpZM4KNPYt.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/pull/1309#pullrequestreview-3756978"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@tomhughes requested changes on #1309"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/1309#pullrequestreview-3756978"}}}</script>