Skip to content

Instantly share code, notes, and snippets.

@peternixey
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save peternixey/11176324 to your computer and use it in GitHub Desktop.

Select an option

Save peternixey/11176324 to your computer and use it in GitHub Desktop.

Revisions

  1. peternixey revised this gist Apr 22, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion clearest if statement
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,5 @@ user_has_not_yet_edited_profile = (user.created_at == user.updated_at)

    if user_is_recently_created
    && invitation_is_unsent
    && user_has_not_yet_edited_profile
    && user_has_not_yet_edited_profile
    ...
  2. peternixey renamed this gist Apr 22, 2014. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion gistfile1.txt → clearest if statement
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@

    user_is_recently_created = user.created_at < 10.minutes.ago
    invitation_is_unsent = !user.invitation_token
    user_has_not_yet_edited_profile = (user.created_at == user.updated_at)
  3. peternixey created this gist Apr 22, 2014.
    8 changes: 8 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@

    user_is_recently_created = user.created_at < 10.minutes.ago
    invitation_is_unsent = !user.invitation_token
    user_has_not_yet_edited_profile = (user.created_at == user.updated_at)

    if user_is_recently_created
    && invitation_is_unsent
    && user_has_not_yet_edited_profile