module Outpost::Model::Routing::ClassMethods

Attributes

public_route_key[RW]

Public Instance Methods

admin_create_path()
Alias for: admin_index_path
admin_create_url()
Alias for: admin_index_url
admin_index_path() click to toggle source

/outpost/blog_entries

# File lib/outpost/model/routing.rb, line 51
def admin_index_path
  collection_route("outpost_#{self.route_key}_path")
end
Also aliased as: admin_create_path
admin_index_url() click to toggle source

kpcc.org/outpost/blog_entries

# File lib/outpost/model/routing.rb, line 58
def admin_index_url
  collection_route("outpost_#{self.route_key}_url")
end
Also aliased as: admin_create_url
admin_new_path() click to toggle source

/outpost/blog_entries/new

# File lib/outpost/model/routing.rb, line 40
def admin_new_path
  collection_route("new_outpost_#{self.singular_route_key}_path")
end
admin_new_url() click to toggle source

kpcc.org/outpost/blog_entries/new

# File lib/outpost/model/routing.rb, line 45
def admin_new_url
  collection_route("new_outpost_#{self.singular_route_key}_url")
end

Private Instance Methods

collection_route(name) click to toggle source
# File lib/outpost/model/routing.rb, line 67
def collection_route(name)
  Rails.application.routes.url_helpers.send(name)
end