Skip to content

Instantly share code, notes, and snippets.

View michaelRM's full-sized avatar

michaelRM michaelRM

  • Winnipeg, MB, Canada
View GitHub Profile
@michaelRM
michaelRM / groups_controller.rb
Created June 11, 2012 19:32
Attempting to allow purchases within groups. TODO create credit card form new.haml
class GroupsController < ApplicationController
skip_before_filter :login_required , :only => [:index,:show,:join]
before_filter :pending? , :only => [:index,:show]
before_filter :suspended? , :only => [:index,:show]
before_filter :find_group, :only => [:edit,:update,:show,:destroy,:manage_docs,:join]
before_filter :require_group_admin, :only => [:edit,:update,:destroy]
def index
q = params[:q]
@michaelRM
michaelRM / gist:2924822
Created June 13, 2012 15:35
credit_card partial conditional
-if @product.is_a?(product)
= form_for @purchases, :url => product_purchases_url(@product), :method => :post do |f|
...