Skip to content

Instantly share code, notes, and snippets.

@paultyng
Last active October 9, 2015 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paultyng/5e0554c73ff0b5684d27 to your computer and use it in GitHub Desktop.
Save paultyng/5e0554c73ff0b5684d27 to your computer and use it in GitHub Desktop.
C9 Rails Getting Started
  1. Delete README.md
  2. rails new blog
  3. cd blog
  4. find . -maxdepth 1 -exec mv {} .. \;
  5. cd ..
  6. rmdir blog
  7. Continue with the Getting Started Guide
# Append to your config/boot.rb file
# from http://stackoverflow.com/a/29562898/973292
require 'rails/commands/server'
module Rails
class Server
def default_options
super.merge(Host: ENV['IP'], Port: ENV['PORT'])
end
end
end

Design Patterns in Rails

A design pattern is a reusable solution to a common software problem. It's not necessarily code, just a general structure / idea that make it easier for devs to communicate about how something works.

For example jQuery use a Fluent Interface, which is the name for the pattern of chaining all your method calls together (ie. $('element').css(color: 'red').show();)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment