Commit 2c2edc6eacbf977cc1b8d9da1431c08fcd628e71
1 parent
a07289bd
Exists in
master
and in
23 other branches
Removed whitespaces
(ActionItem2899)
Showing
2 changed files
with
16 additions
and
16 deletions
Show diff stats
app/controllers/public/profile_controller.rb
| ... | ... | @@ -206,7 +206,7 @@ class ProfileController < PublicController |
| 206 | 206 | end |
| 207 | 207 | |
| 208 | 208 | def view_more_network_activities |
| 209 | - @activities = @profile.tracked_notifications.paginate(:per_page => 10, :page => params[:page]) | |
| 209 | + @activities = @profile.tracked_notifications.paginate(:per_page => 10, :page => params[:page]) | |
| 210 | 210 | render :partial => 'profile_network_activities', :locals => {:network_activities => @activities} |
| 211 | 211 | end |
| 212 | 212 | |
| ... | ... | @@ -218,15 +218,15 @@ class ProfileController < PublicController |
| 218 | 218 | no_more_pages = comments_count <= comment_page * comments_per_page |
| 219 | 219 | |
| 220 | 220 | render :update do |page| |
| 221 | - page.insert_html :bottom, 'profile-wall-activities-comments-'+params[:activity], | |
| 221 | + page.insert_html :bottom, 'profile-wall-activities-comments-'+params[:activity], | |
| 222 | 222 | :partial => 'comment', :collection => activity.comments.paginate(:per_page => comments_per_page, :page => comment_page) |
| 223 | - | |
| 223 | + | |
| 224 | 224 | if no_more_pages |
| 225 | - page.remove 'profile-wall-activities-comments-more-'+params[:activity] | |
| 225 | + page.remove 'profile-wall-activities-comments-more-'+params[:activity] | |
| 226 | 226 | else |
| 227 | - page.replace_html 'profile-wall-activities-comments-more-'+params[:activity], | |
| 228 | - :partial => 'more_comments', :locals => {:activity => activity, :comment_page => comment_page} | |
| 229 | - end | |
| 227 | + page.replace_html 'profile-wall-activities-comments-more-'+params[:activity], | |
| 228 | + :partial => 'more_comments', :locals => {:activity => activity, :comment_page => comment_page} | |
| 229 | + end | |
| 230 | 230 | end |
| 231 | 231 | end |
| 232 | 232 | |
| ... | ... | @@ -238,15 +238,15 @@ class ProfileController < PublicController |
| 238 | 238 | no_more_pages = comments_count <= comment_page * comments_per_page |
| 239 | 239 | |
| 240 | 240 | render :update do |page| |
| 241 | - page.insert_html :bottom, 'profile-wall-activities-comments-'+params[:activity], | |
| 241 | + page.insert_html :bottom, 'profile-wall-activities-comments-'+params[:activity], | |
| 242 | 242 | :partial => 'profile_scrap', :collection => activity.replies.paginate(:per_page => comments_per_page, :page => comment_page), :as => :scrap |
| 243 | - | |
| 243 | + | |
| 244 | 244 | if no_more_pages |
| 245 | - page.remove 'profile-wall-activities-comments-more-'+params[:activity] | |
| 245 | + page.remove 'profile-wall-activities-comments-more-'+params[:activity] | |
| 246 | 246 | else |
| 247 | - page.replace_html 'profile-wall-activities-comments-more-'+params[:activity], | |
| 248 | - :partial => 'more_replies', :locals => {:activity => activity, :comment_page => comment_page} | |
| 249 | - end | |
| 247 | + page.replace_html 'profile-wall-activities-comments-more-'+params[:activity], | |
| 248 | + :partial => 'more_replies', :locals => {:activity => activity, :comment_page => comment_page} | |
| 249 | + end | |
| 250 | 250 | end |
| 251 | 251 | end |
| 252 | 252 | |
| ... | ... | @@ -434,5 +434,5 @@ class ProfileController < PublicController |
| 434 | 434 | def relations_to_include |
| 435 | 435 | [:image, :domains, :preferred_domain, :environment] |
| 436 | 436 | end |
| 437 | - | |
| 437 | + | |
| 438 | 438 | end | ... | ... |
vendor/plugins/action_tracker_has_comments/init.rb
| ... | ... | @@ -3,8 +3,8 @@ |
| 3 | 3 | Rails.configuration.to_prepare do |
| 4 | 4 | ActionTracker::Record.module_eval do |
| 5 | 5 | |
| 6 | - has_many :comments, :class_name => 'Comment', :foreign_key => 'source_id', :dependent => :destroy, | |
| 7 | - :finder_sql => 'SELECT * FROM comments WHERE #{conditions_for_comments} ORDER BY created_at ASC', | |
| 6 | + has_many :comments, :class_name => 'Comment', :foreign_key => 'source_id', :dependent => :destroy, | |
| 7 | + :finder_sql => 'SELECT * FROM comments WHERE #{conditions_for_comments} ORDER BY created_at ASC', | |
| 8 | 8 | :counter_sql => 'SELECT COUNT(*) FROM comments WHERE #{conditions_for_comments}' |
| 9 | 9 | |
| 10 | 10 | def conditions_for_comments | ... | ... |