Module: Seahorse::Model

Extended by:
ActiveSupport::Concern
Defined in:
lib/seahorse/model.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.add_all_routes(router) ⇒ Object



8
9
10
11
# File 'lib/seahorse/model.rb', line 8

def add_all_routes(router)
  Dir.glob("#{Rails.root}/app/models/api/*.rb").each {|f| load f }
  @@apis.values.each {|api| api.add_routes(router) }
end

.apisObject



6
# File 'lib/seahorse/model.rb', line 6

def apis; @@apis end