This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2010-01-14 10:30:53 +00:00
|
|
|
class Link < Item
|
|
|
|
|
2011-04-13 10:19:51 +00:00
|
|
|
field :url
|
2010-01-14 10:30:53 +00:00
|
|
|
|
2011-04-13 10:19:51 +00:00
|
|
|
validates_presence_of :url
|
|
|
|
|
2010-01-14 10:30:53 +00:00
|
|
|
def link
|
2011-04-13 10:19:51 +00:00
|
|
|
ApplicationController.helpers.link_to(self.name, self.url)
|
2010-01-14 10:30:53 +00:00
|
|
|
end
|
|
|
|
|
2011-04-13 10:19:51 +00:00
|
|
|
end
|