Skip to content

Commit 6e5d46c

Browse files
committed
Revert "Fidgety code style stuff that's been annoying me for a while."
This reverts commit 28e166e.
1 parent 17bf4f1 commit 6e5d46c

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

app/controllers/highlights_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def destroy
3131
@highlight = current_user.highlights.find(params[:id])
3232
@badge = nil
3333
if @highlight.destroy
34-
# record_event("highlight removed", mp_note: @highlight.description)
34+
# record_event("highlight removed", :mp_note => @highlight.description)
3535
badge = Beaver.new(current_user)
3636
unless badge.award?
3737
@badge = current_user.badges.where(badge_class_name: Beaver.name).first

app/controllers/skills_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def destroy
2828
@skill = current_user.skills.find(params[:id])
2929
if @skill
3030

31-
# record_event('deleted skill', skill: @skill.tokenized)
31+
# record_event('deleted skill', :skill => @skill.tokenized)
3232
flash[:notice] = "Ok got it...you're no longer into #{@skill.name}"
3333
@skill.destroy
3434
redirect_to(badge_url(username: @skill.user.username))

app/models/network.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def assign_mayor!
123123
Rails.logger.debug "mayor for #{name} found: #{person_with_most_upvoted_protips_on_topic.username}"
124124

125125
# if self.mayor && person_with_most_upvoted_protips_on_topic && person_with_most_upvoted_protips_on_topic.id != self.mayor.id
126-
# enqueue(GenerateEvent, :new_mayor, Hash[*[Audience.network(self.id), Audience.admin].map(&:to_a).flatten(2)], self.to_event_hash(mayor: person_with_most_upvoted_protips_on_topic), 30.minutes)
126+
# enqueue(GenerateEvent, :new_mayor, Hash[*[Audience.network(self.id), Audience.admin].map(&:to_a).flatten(2)], self.to_event_hash(:mayor => person_with_most_upvoted_protips_on_topic), 30.minutes)
127127
# end
128128

129129
network_experts.build(user: person_with_most_upvoted_protips_on_topic, designation: :mayor)
@@ -181,7 +181,7 @@ def new_protips(limit = nil, offset = 0)
181181
end
182182

183183
def featured_protips(limit = nil, offset = 0)
184-
# self.protips.where(featured: true)
184+
# self.protips.where(:featured => true)
185185
Protip.search('featured:true', tags, page: offset, per_page: limit)
186186
end
187187

app/models/protip.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def search(query_string, tags = [], options = {})
162162
end
163163
end
164164
sort { by [sorts] }
165-
# sort { by [{upvotes: 'desc' }] }
165+
# sort { by [{:upvotes => 'desc' }] }
166166
end
167167
rescue Tire::Search::SearchRequestFailed => e
168168
::SearchResultsWrapper.new(nil, 'Looks like our search servers are out to lunch. Try again soon.')

app/models/user.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class User < ActiveRecord::Base
5050
exclusion: { in: RESERVED, message: 'is reserved' },
5151
format: { with: VALID_USERNAME, message: 'must not contain a period' }
5252

53-
validates_uniqueness_of :username # , case_sensitive: false, on: :create
53+
validates_uniqueness_of :username # , :case_sensitive => false, :on => :create
5454

5555
validates_presence_of :username
5656
validates_presence_of :email

app/uploaders/banner_uploader.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class BannerUploader < CoderwallUploader
22
# process :apply_tilt_shift
3-
# process resize_to_fill: [500, 375]
4-
# process resize_to_fit: [500, 375]
3+
# process :resize_to_fill => [500, 375]
4+
# process :resize_to_fit => [500, 375]
55

66
def extension_white_list
77
%w(jpg jpeg gif png)

lib/importers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class << self
55
def import_from_fact(_fact)
66
# slideshare_display_url = "http://www.slideshare.net/slideshow/embed_code/#{fact.identity}"
77
# unless Protip.already_created_a_protip_for(slideshare_display_url)
8-
# user = User.where(slideshare: fact.owner.match(/slideshare:(.+)/)[1]).first
8+
# user = User.where(:slideshare => fact.owner.match(/slideshare:(.+)/)[1]).first
99
# return if user.nil?
1010
# Rails.logger.debug "creating slideshare: #{fact.url} by #{fact.owner}/#{user.username unless user.nil?}"
1111
# user.protips.create(title: fact.name, body: slideshare_display_url, created_at: fact.relevant_on, topics: ["Slideshare"], created_by: Protip::IMPORTER, user: user)

lib/search.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def initialize(name, type, field, options)
121121
end
122122

123123
def to_eval_form
124-
"facet '#{@name}', global: #{@global} do \n"\
124+
"facet '#{@name}', :global => #{@global} do \n"\
125125
"#{@type} :#{@field} #{evaluatable_options} \n"\
126126
'end'
127127
end

0 commit comments

Comments
 (0)