Skip to content

Instantly share code, notes, and snippets.

@andrewhl
Created March 1, 2012 22:39
Show Gist options
  • Save andrewhl/1953743 to your computer and use it in GitHub Desktop.
Save andrewhl/1953743 to your computer and use it in GitHub Desktop.
# == Schema Information
#
# Table name: after_school_programs
#
# id :integer not null, primary key
# day :string(255)
# program_name :string(255)
# price :string(255)
# status :string(255)
# dates :string(255)
# max_registrants :integer
# created_at :datetime not null
# updated_at :datetime not null
#
class AfterSchoolProgram < ActiveRecord::Base
attr_accessible :day,
:program_name,
:price,
:status,
:dates,
:max_registrants
end
class AfterSchoolProgramsController < ApplicationController
before_filter :admin_user, :all
def new
@program = AfterSchoolProgram.new
end
def show
end
def destroy
end
def edit
end
def index
@programs = AfterSchoolProgram.all
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment