Sha256: dd2e9780f9c79e105a862c8f0a189b586808ac4ac3ebaa8a176e66688ba852c2
Contents?: true
Size: 817 Bytes
Versions: 49
Compression:
Stored size: 817 Bytes
Contents
module Rao module ResourcesController::RestResourceUrlsConcern extend ActiveSupport::Concern included do helper_method :new_resource_path helper_method :collection_path helper_method :resource_path helper_method :edit_resource_path end private def new_resource_path resource_router.send(:url_for, { action: :new, only_path: true }) end def collection_path resource_router.send(:url_for, { action: :index, only_path: true }) end def resource_path(resource) resource_router.send(:url_for, { action: :show, id: resource, only_path: true }) end def edit_resource_path(resource) resource_router.send(:url_for, { action: :edit, id: resource, only_path: true }) end def resource_router self end end end
Version data entries
49 entries across 49 versions & 1 rubygems