Sha256: 1cde33e890242fc259bbd78f839d0dec1e66d665ef8c0a8503c5b6540aa4b109

Contents?: true

Size: 1.53 KB

Versions: 11

Compression:

Stored size: 1.53 KB

Contents

module ResourceController
  # == ResourceController::Helpers
  #
  # Included in Base.
  #
  # These helpers are used internally to manage objects, generate urls, and manage parent resource associations.
  #
  # If you want to customize certain controller behaviour, like member-object, and collection fetching, overriding these methods is all it takes.
  #
  # See the docs below, and the README for examples
  #
  # *Please Note: many of these helpers build on top of each other, and require that behaviour to be maintained, in order for other functionality to work properly.*
  #
  # e.g. All fetching must be done on top of the method end_of_association_chain, or else parent resources (including polymorphic ones) won't function correctly.
  #
  #   class PostsController < ResourceController::Base
  #   private
  #     def object
  #       @object ||= end_of_association_chain.find_by_permalink(param)
  #     end
  #   end
  module Helpers
    autoload :Urls,                     'resource_controller/helpers/urls'
    autoload :Internal,                 'resource_controller/helpers/internal'
    autoload :Nested,                   'resource_controller/helpers/nested'
    autoload :CurrentObjects,           'resource_controller/helpers/current_objects'
    autoload :SingletonCustomizations,  'resource_controller/helpers/singleton_customizations'

    include ResourceController::Helpers::Urls
    include ResourceController::Helpers::Internal
    include ResourceController::Helpers::Nested
    include ResourceController::Helpers::CurrentObjects
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
makandra_resource_controller-0.8.0 lib/resource_controller/helpers.rb
resources_controller-1.0.4 lib/resource_controller/helpers.rb
resources_controller-1.0.3 lib/resource_controller/helpers.rb
resources_controller-1.0.2 lib/resource_controller/helpers.rb
makandra_resource_controller-0.7.3 lib/resource_controller/helpers.rb
makandra_resource_controller-0.7.2 lib/resource_controller/helpers.rb
rd_resource_controller-1.0.1 lib/resource_controller/helpers.rb
rd_resource_controller-1.0.0 lib/resource_controller/helpers.rb
makandra_resource_controller-0.7.1 lib/resource_controller/helpers.rb
makandra_resource_controller-0.7.0 lib/resource_controller/helpers.rb
rd_resource_controller-1.0.0.rc lib/resource_controller/helpers.rb