Skip to content

Instantly share code, notes, and snippets.

@capoferro
Created April 15, 2013 22:36
Show Gist options
  • Select an option

  • Save capoferro/5391854 to your computer and use it in GitHub Desktop.

Select an option

Save capoferro/5391854 to your computer and use it in GitHub Desktop.
# starting point (line is too long)
def send_mail(source)
Mailer.deliver(to: 'bob@example.com', from: 'us@example.com', subject: 'Important message', body: source.text)
end
# bad (normal indent)
def send_mail(source)
Mailer.deliver(
to: 'bob@example.com',
from: 'us@example.com',
subject: 'Important message',
body: source.text)
end
# bad (double indent)
def send_mail(source)
Mailer.deliver(
to: 'bob@example.com',
from: 'us@example.com',
subject: 'Important message',
body: source.text)
end
# good
def send_mail(source)
Mailer.deliver(to: 'bob@example.com',
from: 'us@example.com',
subject: 'Important message',
body: source.text)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment