Skip to content

Instantly share code, notes, and snippets.

@ridget
ridget / 20120625030355_add_deleted_at_to_user.rb
Last active September 16, 2015 05:00 — forked from TimFletcher/20120625030355_add_deleted_at_to_user.rb
Trashable 'concern' for Rails models
# db/migrate/20120625030355_add_deleted_at_to_user.rb
class AddDeletedAtToUser < ActiveRecord::Migration
def change
add_column :users, :deleted_at, :datetime
end
end
@ridget
ridget / right.md
Created February 7, 2012 10:56 — forked from radar/rules.md

Asking questions, the right way

When asking questions in the #rubyonrails channel, please follow these 10 simple rules:

  1. Do your research before hand. Your question may be answerable with a quick Google search.
  2. If you've tried Googling, explain what terms you've tried to use so people can better help you.
  3. Do not use pastebin.org or bin.cakephp.org (LOL!). Its font is tiny and it has ads on it which cause the page to load slowly. Use Gist (http://gist.github.com) instead!
  4. Remember that using English is preferable, as the majority of people in the channel speak it. Asking in other languages may give you a response, but English is best.
  5. Anything more than 2 lines goes in a Gist (http://gist.github.com) or a Pastie (http://pastie.org). Spamming the channel with walls of text is not welcome.
  6. Clearly explain what is happening and create a Gist (http://gist.github.com) or Pastie (http://pastie.org) of the code that is causing the problem you are encountering, as wel