orbit-basic/app/models/link.rb

12 lines
156 B
Ruby

class Link < Item
field :url
validates_presence_of :url
def link
ApplicationController.helpers.link_to(self.name, self.url)
end
end