Skip to content

Instantly share code, notes, and snippets.

View codespectator's full-sized avatar

James MacLeod codespectator

View GitHub Profile
<% select_options = %w{Enrolled Redeem Social}.collect {|opt| [opt, opt.downcase] } %>
<%= select_tag :dynamic_select, options_for_select(select_options, :selected => params[:type]), :prompt => 'All' %>
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- Disable automatic DNS prefetching.
class Order < ActiveRecord::Base
belongs_to :order_type
has_many :contacts
def delivered
self.contacts.length
end