Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixing idiom for retired_switch. #1

Merged
merged 1 commit into from

2 participants

@steveklabnik

I poked around your code at random, and noticed this little thing.

@steveklabnik steveklabnik Fixing idiom for retired_switch.
I poked around your code at random, and noticed this little thing.
7e7c370
@Andrewglass1 Andrewglass1 merged commit 5e2a7c7 into from
@Andrewglass1
Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 19, 2012
  1. @steveklabnik

    Fixing idiom for retired_switch.

    steveklabnik authored
    I poked around your code at random, and noticed this little thing.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 4 deletions.
  1. +1 −4 app/models/product.rb
View
5 app/models/product.rb
@@ -21,10 +21,7 @@ def category_list
end
def retired_switch
- case retired
- when true then false
- when false then true
- end
+ !retired
end
def badge_html
Something went wrong with that request. Please try again.