Commit a93b066566dc1885b1a0efcea374c09b4fd26679
Exists in
staging
and in
1 other branch
merge with master
Showing
3 changed files
with
4 additions
and
3 deletions
Show diff stats
app/helpers/article_helper.rb
... | ... | @@ -188,9 +188,9 @@ module ArticleHelper |
188 | 188 | def following_button(page, user) |
189 | 189 | if !user.blank? and user != page.author |
190 | 190 | if page.is_followed_by? user |
191 | - button :cancel, unfollow_button_text(page), {:controller => 'profile', :action => 'unfollow_article', :article_id => page.id, :profile => page.profile.identifier} | |
191 | + button :cancel, unfollow_button_text(page), {:controller => 'profile', :profile => page.profile.identifier, :action => 'unfollow_article', :article_id => page.id, :profile => page.profile.identifier} | |
192 | 192 | else |
193 | - button :add, follow_button_text(page), {:controller => 'profile', :action => 'follow_article', :article_id => page.id, :profile => page.profile.identifier} | |
193 | + button :add, follow_button_text(page), {:controller => 'profile', :profile => page.profile.identifier, :action => 'follow_article', :article_id => page.id, :profile => page.profile.identifier} | |
194 | 194 | end |
195 | 195 | end |
196 | 196 | end | ... | ... |
db/schema.rb
... | ... | @@ -291,6 +291,7 @@ ActiveRecord::Schema.define(version: 20160422163123) do |
291 | 291 | t.text "settings" |
292 | 292 | t.integer "paragraph_id" |
293 | 293 | t.string "paragraph_uuid" |
294 | + t.integer "group_id" | |
294 | 295 | end |
295 | 296 | |
296 | 297 | add_index "comments", ["paragraph_uuid"], name: "index_comments_on_paragraph_uuid", using: :btree | ... | ... |
plugins/comment_group/lib/ext/article.rb
... | ... | @@ -3,7 +3,7 @@ require_dependency 'article' |
3 | 3 | class Article |
4 | 4 | |
5 | 5 | has_many :group_comments, -> { |
6 | - order('created_at asc').where('group_id IS NOT NULL') | |
6 | + order('created_at asc').where('comments.group_id IS NOT NULL') | |
7 | 7 | }, class_name: 'Comment', foreign_key: 'source_id', dependent: :destroy |
8 | 8 | |
9 | 9 | validate :not_empty_group_comments_removed | ... | ... |