start new:
tmux
start new with session name:
tmux new -s myname
class AddressBook | |
def contacts | |
@contacts ||= [] | |
end | |
def self.load_from_path(path) | |
# Create a new AddressBook instance | |
address_book = self.new | |
# Create a new AddressBookDSL instance |
As configured in my dotfiles.
start new:
tmux
start new with session name:
source 'https://rubygems.org' | |
gem 'rails', '3.2.1' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
require 'net/http' | |
def post_xml url_string, xml_string | |
uri = URI.parse url_string | |
request = Net::HTTP::Post.new uri.path | |
request.body = xml_string | |
request.content_type = 'text/xml' | |
response = Net::HTTP.new(uri.host, uri.port).start { |http| http.request request } | |
response.body | |
end |
1. Use latest build | |
gem 'simple_form', :git => 'git://github.com/plataformatec/simple_form.git' | |
2. Create an initializer | |
# /config/initializers/simple_form.rb | |
# Use this setup block to configure all options available in SimpleForm. | |
SimpleForm.setup do |config| | |
# Wrappers are used by the form builder to generate a complete input. | |
# You can remove any component from the wrapper, change the order or even |