Skip to content

Instantly share code, notes, and snippets.

@bobbywilson0
Forked from tie-rack/gist:37855
Created December 19, 2008 03:12
Show Gist options
  • Save bobbywilson0/37859 to your computer and use it in GitHub Desktop.
Save bobbywilson0/37859 to your computer and use it in GitHub Desktop.
class Appointment < ActiveRecord::Base
attr_reader :availability
def full?
availability < 1
end
end
# And then in your view
<% if appointment.full? %>
'class is full'
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment