Sha256: 4b86ea639071a3b75de8d06a65bb07d07f583a55c3109ef4e5a5ccc2ed891bf4
Contents?: true
Size: 1007 Bytes
Versions: 12
Compression:
Stored size: 1007 Bytes
Contents
require "enju_library/engine" require "enju_library/item" module EnjuLibrary def self.included(base) base.extend(ClassMethods) end module ClassMethods def enju_library include EnjuLibrary::InstanceMethods end end module InstanceMethods private def get_library_group @library_group = LibraryGroup.site_config end def get_shelf @shelf = Shelf.includes(:library).find(params[:shelf_id]) if params[:shelf_id] end def get_library @library = Library.find(params[:library_id]) if params[:library_id] end def get_libraries @libraries = Library.all_cache end def get_bookstore @bookstore = Bookstore.find(params[:bookstore_id]) if params[:bookstore_id] end def get_subscription @subscription = Subscription.find(params[:subscription_id]) if params[:subscription_id] end end end ActiveRecord::Base.send :include, EnjuLibrary::LibraryItem ActionController::Base.send(:include, EnjuLibrary)
Version data entries
12 entries across 12 versions & 1 rubygems