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 LinksHelperTest < ActionView::TestCase | |
| should "return an image tag on :WriteImage" do | |
| output = WriteImage('8') | |
| assert output =~ /<img/ | |
| end | |
| 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 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 |
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 Organization < ActiveRecord::Base | |
| include UrlFriendlyName | |
| has_url_friendly_name :text_id, :fields, :to, :be, :condensed, :concatenated | |
| 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
| 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 |
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
| #!/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 |
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
| #!/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 |
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 -w | |
| # | |
| # Testing Prawn PDF generation | |
| require 'rubygems' | |
| require 'prawn' | |
| require 'prawn/layout' | |
| require 'prawn/format' | |
| class TermSheet < Prawn::Document |
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
| // 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 |
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
| // color constants | |
| !dark_grey = #333 | |
| !medium_grey = #666 | |
| !light_grey = #999 | |
| !lighter_grey = #ccc | |
| !green = #4cbb17 | |
| !dark_green = #2c7A07 |
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 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 |