Skip to content

Instantly share code, notes, and snippets.

@bobbywilson0
Created December 19, 2008 02:45
Show Gist options
  • Save bobbywilson0/37772 to your computer and use it in GitHub Desktop.
Save bobbywilson0/37772 to your computer and use it in GitHub Desktop.
class Appointment < ActiveRecord::Base
...
attr_reader :availability
def self.availability
if availablity < 1
puts 'class is full'
else
availability # return the current instance's availability
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment