This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'sinatra' | |
require 'haml' | |
require 'gdata' | |
PROJECT_PATH = "/your/project/path" | |
DOMAIN = 'your_google_apps_domain_or_blank_for_any_google_account.com' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span id="update_me">Some text that needs to be updated.</span> | |
<%=link_to_remote "Update", :url => "/update/something", :update => 'update_me' %> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def class Cart < ActiveRecord::Base | |
#... | |
def installation_instructions_pdf(pdf = nil) | |
pdf ||= Prawn::Document.new | |
eval(IO.read("app/views/cards/installation.pdf.prawn")) | |
end | |
#... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person < ActiveRecord::Base | |
has_many :orders | |
has_many :lines, :through => :products | |
has_many :products, :through => :lines | |
end | |
class Order < ActiveRecord::Base | |
has_many :lines | |
has_many :products, :through => :lines | |
end |
NewerOlder