Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 04ae86f435
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (14 sloc) 0.507 kb
class Linkset < ActiveRecord::Base
belongs_to :rubygem
attr_protected :rubygem_id
LINKS = %w(home wiki docs mail code bugs).freeze
LINKS.each do |url|
validates_formatting_of url.to_sym, :using => :url, :allow_nil => true, :allow_blank => true, :message => "does not appear to be a valid URL"
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.