Commit 2c2edc6eacbf977cc1b8d9da1431c08fcd628e71

Authored by Daniela Feitosa
1 parent a07289bd

Removed whitespaces

(ActionItem2899)
app/controllers/public/profile_controller.rb
@@ -206,7 +206,7 @@ class ProfileController < PublicController @@ -206,7 +206,7 @@ class ProfileController < PublicController
206 end 206 end
207 207
208 def view_more_network_activities 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 render :partial => 'profile_network_activities', :locals => {:network_activities => @activities} 210 render :partial => 'profile_network_activities', :locals => {:network_activities => @activities}
211 end 211 end
212 212
@@ -218,15 +218,15 @@ class ProfileController < PublicController @@ -218,15 +218,15 @@ class ProfileController < PublicController
218 no_more_pages = comments_count <= comment_page * comments_per_page 218 no_more_pages = comments_count <= comment_page * comments_per_page
219 219
220 render :update do |page| 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 :partial => 'comment', :collection => activity.comments.paginate(:per_page => comments_per_page, :page => comment_page) 222 :partial => 'comment', :collection => activity.comments.paginate(:per_page => comments_per_page, :page => comment_page)
223 - 223 +
224 if no_more_pages 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 else 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 end 230 end
231 end 231 end
232 232
@@ -238,15 +238,15 @@ class ProfileController &lt; PublicController @@ -238,15 +238,15 @@ class ProfileController &lt; PublicController
238 no_more_pages = comments_count <= comment_page * comments_per_page 238 no_more_pages = comments_count <= comment_page * comments_per_page
239 239
240 render :update do |page| 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 :partial => 'profile_scrap', :collection => activity.replies.paginate(:per_page => comments_per_page, :page => comment_page), :as => :scrap 242 :partial => 'profile_scrap', :collection => activity.replies.paginate(:per_page => comments_per_page, :page => comment_page), :as => :scrap
243 - 243 +
244 if no_more_pages 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 else 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 end 250 end
251 end 251 end
252 252
@@ -434,5 +434,5 @@ class ProfileController &lt; PublicController @@ -434,5 +434,5 @@ class ProfileController &lt; PublicController
434 def relations_to_include 434 def relations_to_include
435 [:image, :domains, :preferred_domain, :environment] 435 [:image, :domains, :preferred_domain, :environment]
436 end 436 end
437 - 437 +
438 end 438 end
vendor/plugins/action_tracker_has_comments/init.rb
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 Rails.configuration.to_prepare do 3 Rails.configuration.to_prepare do
4 ActionTracker::Record.module_eval do 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 :counter_sql => 'SELECT COUNT(*) FROM comments WHERE #{conditions_for_comments}' 8 :counter_sql => 'SELECT COUNT(*) FROM comments WHERE #{conditions_for_comments}'
9 9
10 def conditions_for_comments 10 def conditions_for_comments