Skip to content

Instantly share code, notes, and snippets.

@joemsak
Created September 18, 2009 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joemsak/189149 to your computer and use it in GitHub Desktop.
Save joemsak/189149 to your computer and use it in GitHub Desktop.
class Gallery < ActiveRecord::Base
belongs_to :user
has_many :photos, :dependent => :destroy
validates_presence_of :title
acts_as_urlnameable :title, :overwrite => true
def to_param
urlname
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment