Skip to content

Instantly share code, notes, and snippets.

@tie-rack
Forked from bobbywilson0/gist:37772
Created December 19, 2008 03:04
Show Gist options
  • Save tie-rack/37855 to your computer and use it in GitHub Desktop.
Save tie-rack/37855 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