Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (14 sloc) 0.428 kb
class Linkset < ActiveRecord::Base
belongs_to :rubygem
attr_protected :rubygem_id
LINKS = %w(home wiki docs mail code bugs)
LINKS.each do |url|
validates_url_format_of url, :allow_nil => true, :allow_blank => true
end
def empty?
LINKS.map { |link| attributes[link] }.all?(&:blank?)
end
def update_attributes_from_gem_specification!(spec)
self.update_attributes!(:home => spec.homepage)
end
end
Jump to Line
Something went wrong with that request. Please try again.