Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 67ebc783f0
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (22 sloc) 0.678 kb
class Namespace < ActiveRecord::Base
belongs_to :library
has_many :functions
#:nocov:
define_index do
# fields
indexes name
indexes libraries.name, :as => :library
has library_id
end
#:nocov:
def self.versions_of(ns)
Namespace.find(:all, :include => :library, :conditions => {:name => ns.name, :libraries => {:name => ns.library.name}})
end
def link_opts(use_current_vs_actual_version = true)
{:controller => 'main',
:action => 'ns',
:lib => library.url_friendly_name,
:version => (use_current_vs_actual_version && library.current ? nil : library.version),
:ns => name}
end
end
Jump to Line
Something went wrong with that request. Please try again.