Sha256: daf0b25eb7e1a686fd068fcbec8d461ab3ab4c53ea2fd10c2c9371d99a865560
Contents?: true
Size: 783 Bytes
Versions: 7
Compression:
Stored size: 783 Bytes
Contents
module AbAdmin module Views module UrlForRoutes extend ActiveSupport::Concern included do protected def resource_path(rec=nil, options={}) r = rec || resource options.reverse_merge!(:id => r.id, :action => :show) url_for options end def edit_resource_path(rec=nil, options={}) r = rec || resource options.reverse_merge!(:id => r.id, :action => :edit) url_for options end def new_resource_path(options={}) options.reverse_merge!(:action => :new) url_for options end def collection_path(options={}) options.reverse_merge!(:action => :index) url_for options end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems