require "make_restful/version" module MakeRestful extend ActiveSupport::Concern extend ActiveSupport::Autoload autoload :ClassMethods autoload :ControllerAdditions autoload :Loaders autoload :RestMethods autoload :Rendering autoload :Specification include Loaders include RestMethods include Rendering include Specification delegate :allow_method?, :allow_format?, to: :klass included do class_attribute :allowed_methods, :allowed_formats, :finder, :pagination, :resource_class attr_reader :resource, :instance, :collection resource name.underscore.gsub(/(.*)_controller/,'\1').singularize allow_formats :json, :jsonp, :xml allow_methods :index, :get, :put, :post, :delete find_by :id end private def klass self.class end end