diff --git a/app/models/post.rb b/app/models/post.rb index d8fad397056..fc42d8d2157 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -443,7 +443,7 @@ class Post < ActiveRecord::Base self.quote_count = quoted_post_numbers.size end - # Process this post after comitting it + # Process this post after committing it def trigger_post_process args = { post_id: id } args[:image_sizes] = image_sizes if image_sizes.present? diff --git a/app/models/user.rb b/app/models/user.rb index 1300cc3d3b2..b32d5d9a8b8 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -347,7 +347,7 @@ class User < ActiveRecord::Base end # The following count methods are somewhat slow - definitely don't use them in a loop. - # They might need to be denormialzied + # They might need to be denormalized def like_count UserAction.where(user_id: id, action_type: UserAction::WAS_LIKED).count end diff --git a/lib/content_buffer.rb b/lib/content_buffer.rb index f448b7ce953..99d176d4cb3 100644 --- a/lib/content_buffer.rb +++ b/lib/content_buffer.rb @@ -1,4 +1,4 @@ -# this class is used to track changes to an arbirary buffer +# this class is used to track changes to an arbitrary buffer class ContentBuffer diff --git a/lib/diff_engine.rb b/lib/diff_engine.rb index 7c9208fa41f..52de0153431 100644 --- a/lib/diff_engine.rb +++ b/lib/diff_engine.rb @@ -9,7 +9,7 @@ class DiffEngine # generate an html friendly diff similar to the way Stack Exchange generate # html diffs # - # retruns: html containing decorations indicating the changes + # returns: html containing decorations indicating the changes def self.html_diff(html_before, html_after) end diff --git a/lib/distributed_hash.rb b/lib/distributed_hash.rb index 4d0cf658cdf..b53f8472db3 100644 --- a/lib/distributed_hash.rb +++ b/lib/distributed_hash.rb @@ -1,4 +1,4 @@ -# Like a hash, just does its best to stay in sync accross the farm +# Like a hash, just does its best to stay in sync across the farm # # Redis backed with an allowance for a certain amount of latency diff --git a/lib/image_optimizer.rb b/lib/image_optimizer.rb index 709bf68f320..13bdbf76442 100644 --- a/lib/image_optimizer.rb +++ b/lib/image_optimizer.rb @@ -28,7 +28,7 @@ class ImageOptimizer def clear_local! end - # yeild a list of relative paths to local images cached + # yield a list of relative paths to local images cached def each_local end diff --git a/lib/image_sizer.rb b/lib/image_sizer.rb index 58b858adf7c..18e8d16d82f 100644 --- a/lib/image_sizer.rb +++ b/lib/image_sizer.rb @@ -10,7 +10,7 @@ module ImageSizer return [w.floor, h.floor] if w < max_width - # Using the maximum width, resize the heigh retaining the aspect ratio + # Using the maximum width, resize the height retaining the aspect ratio [max_width.floor, (h * (max_width / w)).floor] end diff --git a/lib/slug.rb b/lib/slug.rb index 8ce5ec74b31..08555448f60 100644 --- a/lib/slug.rb +++ b/lib/slug.rb @@ -1,6 +1,6 @@ # encoding: utf-8 -# Generates a slug. This is annoying beacuse it's duplicating what the javascript +# Generates a slug. This is annoying because it's duplicating what the javascript # does, but on the other hand slugs are never matched so it's okay if they differ # a little. module Slug