Skip to content

Instantly share code, notes, and snippets.

class LegislatorsController < ApplicationController
layout :choose_layout
def search
setup_search(legislators_path(:u => params[:u]))
end
def bm_search
setup_search(bm_legislators_path(:u => params[:u]))
end
class Organization < ActiveRecord::Base
include UrlFriendlyName
has_url_friendly_name :text_id, :fields, :to, :be, :condensed, :concatenated
end
aasm_initial_state :created
aasm_state :reviewed_by_sales_engineer
aasm_state :accepted_by_account_rep
aasm_state :approved_by_sales_manager
aasm_state :approved_by_executive
aasm_state :submitted_to_customer
aasm_state :signed_by_customer
aasm_state :signature_accepted_by_sales
aasm_state :signature_accepted_by_executive
#!/bin/sh -x
#
# Use together with 'ship' from a feature branch when you're
# ready to push the changes into master, and to the origin.
#
# $ hack && ship
#
# Name this 'hack', place it in your path, make it executable
#
# Origin: http://reinh.com/blog/2008/08/27/hack-and-and-ship.html
#!/bin/sh -x
#
# Use together with 'hack' from a feature branch when you're
# ready to push the changes into master, and to the origin.
#
# $ hack && ship
#
# Name this 'ship', place it in your path, make it executable
#
# Origin: http://reinh.com/blog/2008/08/27/hack-and-and-ship.html
#!/usr/bin/ruby -w
#
# Testing Prawn PDF generation
require 'rubygems'
require 'prawn'
require 'prawn/layout'
require 'prawn/format'
class TermSheet < Prawn::Document
// header
#header
:background = !watermelon url("/images/watermelon-texture.jpg")
:padding 20px 0px
:height 100px
:margin 0
a, a:hover, a:visited
:color = !watermelon
:text-decoration none
// color constants
!dark_grey = #333
!medium_grey = #666
!light_grey = #999
!lighter_grey = #ccc
!green = #4cbb17
!dark_green = #2c7A07
class RfqsController < ApplicationController
before_filter :find_rfq, :only => %w(show edit update destroy)
before_filter :login_required, :only => %w(index show edit update destroy)
def index
@rfqs = current_user.organization.rfqs
respond_to do |format|
format.html
end
end