repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/picture_files_controller.rb | app/controllers/picture_files_controller.rb | class PictureFilesController < ApplicationController
before_action :set_picture_file, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_attachable, only: [ :index, :new ]
skip_before_action :store_current_location, only: :show
# GET /pic... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/withdraws_controller.rb | app/controllers/withdraws_controller.rb | class WithdrawsController < ApplicationController
before_action :set_withdraw, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_basket, only: [ :index, :create ]
# GET /withdraws
# GET /withdraws.json
def index
if request.format.t... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/agent_relationships_controller.rb | app/controllers/agent_relationships_controller.rb | class AgentRelationshipsController < ApplicationController
before_action :set_agent_relationship, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_agent
before_action :prepare_options, only: [ :new, :edit ]
# GET /agent_relationships
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/baskets_controller.rb | app/controllers/baskets_controller.rb | class BasketsController < ApplicationController
before_action :set_basket, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /baskets
# GET /baskets.json
def index
if current_user.has_role?("Librarian")
@baskets = Basket.page(params[:page])... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/bookmarks_controller.rb | app/controllers/bookmarks_controller.rb | class BookmarksController < ApplicationController
before_action :set_bookmark, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_user, only: :index
# GET /bookmarks
# GET /bookmarks.json
def index
search = Bookmark.search(include: ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/orders_controller.rb | app/controllers/orders_controller.rb | class OrdersController < ApplicationController
before_action :set_order, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :set_order_list
before_action :set_purchase_request
# GET /orders
# GET /orders.json
def index
case
when @o... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/agent_import_results_controller.rb | app/controllers/agent_import_results_controller.rb | class AgentImportResultsController < ApplicationController
before_action :set_agent_import_result, only: [ :show, :destroy ]
before_action :check_policy, only: [ :index ]
# GET /agent_import_results
# GET /agent_import_results.json
def index
@agent_import_file = AgentImportFile.find_by(id: params[:agent_... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/subject_types_controller.rb | app/controllers/subject_types_controller.rb | class SubjectTypesController < ApplicationController
before_action :set_subject_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /subject_types
# GET /subject_types.json
def index
@subject_types = SubjectType.order(:position)
respond_... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/manifestation_checkout_stats_controller.rb | app/controllers/manifestation_checkout_stats_controller.rb | class ManifestationCheckoutStatsController < ApplicationController
before_action :set_manifestation_checkout_stat, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
after_action :convert_charset, only: :show
# GET /manifestation_checkout_stats
# GET /manif... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/news_feeds_controller.rb | app/controllers/news_feeds_controller.rb | class NewsFeedsController < ApplicationController
before_action :set_news_feed, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /news_feeds
# GET /news_feeds.json
def index
@news_feeds = NewsFeed.page(params[:page])
respond_to do |format|
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/inventory_files_controller.rb | app/controllers/inventory_files_controller.rb | class InventoryFilesController < ApplicationController
before_action :set_inventory_file, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :prepare_options, only: [ :new, :edit ]
# GET /inventory_files
# GET /inventory_files.json
def index... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/series_statement_merge_lists_controller.rb | app/controllers/series_statement_merge_lists_controller.rb | class SeriesStatementMergeListsController < ApplicationController
before_action :set_series_statement_merge_list, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /series_statement_merge_lists
# GET /series_statement_merge_lists.json
def index
@... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/countries_controller.rb | app/controllers/countries_controller.rb | class CountriesController < ApplicationController
before_action :set_country, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /countries
# GET /countries.json
def index
@countries = Country.page(params[:page])
respond_to do |format|
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/use_restrictions_controller.rb | app/controllers/use_restrictions_controller.rb | class UseRestrictionsController < ApplicationController
before_action :set_use_restriction, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /use_restrictions
# GET /use_restrictions.json
def index
@use_restrictions = UseRestriction.order(:posit... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/item_custom_properties_controller.rb | app/controllers/item_custom_properties_controller.rb | class ItemCustomPropertiesController < ApplicationController
before_action :set_item_custom_property, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /item_custom_properties
def index
@item_custom_properties = ItemCustomProperty.order(:position)
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/news_posts_controller.rb | app/controllers/news_posts_controller.rb | class NewsPostsController < ApplicationController
before_action :set_news_post, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :prepare_options, only: [ :new, :edit ]
# GET /news_posts
# GET /news_posts.json
def index
if current_user... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/user_import_results_controller.rb | app/controllers/user_import_results_controller.rb | class UserImportResultsController < ApplicationController
before_action :set_user_import_result, only: [ :show, :destroy ]
before_action :check_policy, only: [ :index ]
# GET /user_import_results
# GET /user_import_results.json
def index
@user_import_file = UserImportFile.find_by(id: params[:user_import_... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/resource_import_results_controller.rb | app/controllers/resource_import_results_controller.rb | class ResourceImportResultsController < ApplicationController
before_action :set_resource_import_result, only: [ :show, :destroy ]
before_action :check_policy, only: [ :index ]
# GET /resource_import_results
# GET /resource_import_results.json
def index
@resource_import_file = ResourceImportFile.find_by(... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/produces_controller.rb | app/controllers/produces_controller.rb | class ProducesController < ApplicationController
before_action :set_produce, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_agent, :get_manifestation
before_action :prepare_options, only: [ :new, :edit ]
# GET /produces
# GET /produ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/agents_controller.rb | app/controllers/agents_controller.rb | class AgentsController < ApplicationController
before_action :set_agent, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_work, :get_expression, :get_manifestation, :get_item, :get_agent, except: [ :update, :destroy ]
before_action :get_ag... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/event_export_files_controller.rb | app/controllers/event_export_files_controller.rb | class EventExportFilesController < ApplicationController
before_action :set_event_export_file, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /event_export_files
# GET /event_export_files.json
def index
@event_export_files = EventExportFile.or... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/item_has_use_restrictions_controller.rb | app/controllers/item_has_use_restrictions_controller.rb | class ItemHasUseRestrictionsController < ApplicationController
before_action :set_item_has_use_restriction, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_item
# GET /item_has_use_restrictions
# GET /item_has_use_restrictions.json
d... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/order_lists_controller.rb | app/controllers/order_lists_controller.rb | class OrderListsController < ApplicationController
before_action :set_order_list, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :prepare_options, only: [ :new, :edit ]
before_action :set_bookstore, only: :index
# GET /order_lists
# GET ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/periodicals_controller.rb | app/controllers/periodicals_controller.rb | class PeriodicalsController < ApplicationController
before_action :set_periodical, only: %i[ show edit update destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /periodicals or /periodicals.json
def index
@periodicals = Periodical.page(params[:page])
end
# GET /periodicals/1 ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/user_groups_controller.rb | app/controllers/user_groups_controller.rb | class UserGroupsController < ApplicationController
before_action :set_user_group, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :prepare_options, only: [ :new, :edit ]
# GET /user_groups
# GET /user_groups.json
def index
@user_group... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/ndl_books_controller.rb | app/controllers/ndl_books_controller.rb | class NdlBooksController < ApplicationController
before_action :check_policy, only: %i[index create]
def index
page = if params[:page].to_i.zero?
1
else
params[:page]
end
@query = params[:query].to_s.strip
books = NdlBook.search(params[:query], page)
@books = Kamin... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/subscribes_controller.rb | app/controllers/subscribes_controller.rb | class SubscribesController < ApplicationController
before_action :set_subscribe, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_subscription, :get_work
# GET /subscribes
# GET /subscribes.json
def index
@subscribes = Subscribe.p... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/circulation_statuses_controller.rb | app/controllers/circulation_statuses_controller.rb | class CirculationStatusesController < ApplicationController
before_action :set_circulation_status, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /circulation_statuses
# GET /circulation_statuses.json
def index
@circulation_statuses = Circulat... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/iiif_presentations_controller.rb | app/controllers/iiif_presentations_controller.rb | class IiifPresentationsController < ApplicationController
def show
@manifestation = Manifestation.find(params[:id])
authorize @manifestation
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/messages_controller.rb | app/controllers/messages_controller.rb | class MessagesController < ApplicationController
before_action :set_message, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create, :destroy_selected ]
before_action :get_user, only: :index
# GET /messages
# GET /messages.json
def index
query = @query = pa... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/form_of_works_controller.rb | app/controllers/form_of_works_controller.rb | class FormOfWorksController < ApplicationController
before_action :set_form_of_work, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /form_of_works
# GET /form_of_works.json
def index
@form_of_works = FormOfWork.order(:position)
respond_to... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/carrier_type_has_checkout_types_controller.rb | app/controllers/carrier_type_has_checkout_types_controller.rb | class CarrierTypeHasCheckoutTypesController < ApplicationController
include EnjuCirculation::Controller
before_action :set_carrier_type_has_checkout_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_checkout_type
before_action :prep... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/manifestation_relationship_types_controller.rb | app/controllers/manifestation_relationship_types_controller.rb | class ManifestationRelationshipTypesController < ApplicationController
before_action :set_manifestation_relationship_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /manifestation_relationship_types
# GET /manifestation_relationship_types.json
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/carrier_types_controller.rb | app/controllers/carrier_types_controller.rb | class CarrierTypesController < ApplicationController
before_action :set_carrier_type, only: [ :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :prepare_options, only: [ :new, :edit ]
skip_after_action :verify_authorized
# GET /carrier_types
# GET /carrie... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/manifestations_controller.rb | app/controllers/manifestations_controller.rb | class ManifestationsController < ApplicationController
before_action :set_manifestation, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :authenticate_user!, only: :edit
before_action :get_agent, :get_manifestation, except: [ :create, :update,... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/creates_controller.rb | app/controllers/creates_controller.rb | class CreatesController < ApplicationController
before_action :set_create, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_agent, :get_work
before_action :prepare_options, only: [ :new, :edit ]
# GET /creates
# GET /creates.json
de... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/shelves_controller.rb | app/controllers/shelves_controller.rb | class ShelvesController < ApplicationController
before_action :set_shelf, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_library
before_action :get_libraries, only: [ :new, :edit, :create, :update ]
# GET /shelves
# GET /shelves.jso... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/request_types_controller.rb | app/controllers/request_types_controller.rb | class RequestTypesController < ApplicationController
before_action :set_request_type, only: [ :show, :edit, :update ]
before_action :check_policy, only: [ :index ]
# GET /request_types
# GET /request_types.json
def index
@request_types = RequestType.order(:position)
respond_to do |format|
form... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/application_controller.rb | app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
include EnjuLibrary::Controller
include EnjuBiblio::Controller
include EnjuEvent::Controller
include EnjuSubject::Controller
include Pundit::Authorization
after_action :verify_authorized, unless: :devise_controller?
impersonates :user
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/event_import_files_controller.rb | app/controllers/event_import_files_controller.rb | class EventImportFilesController < ApplicationController
before_action :set_event_import_file, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :prepare_options, only: [ :new, :edit ]
# GET /event_import_files
# GET /event_import_files.json
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/manifestation_reserve_stats_controller.rb | app/controllers/manifestation_reserve_stats_controller.rb | class ManifestationReserveStatsController < ApplicationController
before_action :set_manifestation_reserve_stat, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
after_action :convert_charset, only: :show
after_action :convert_charset, only: :show
# GET /... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/user_group_has_checkout_types_controller.rb | app/controllers/user_group_has_checkout_types_controller.rb | class UserGroupHasCheckoutTypesController < ApplicationController
include EnjuCirculation::Controller
before_action :set_user_group_has_checkout_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
helper_method :get_user_group, :get_checkout_type
before... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/concerns/enju_purchase_request/controller.rb | app/controllers/concerns/enju_purchase_request/controller.rb | module EnjuPurchaseRequest
module Controller
private
def get_order_list
if params[:order_list_id]
@order_list = OrderList.find(params[:order_list_id])
authorize @order_list, :show?
end
end
def get_purchase_request
if params[:purchase_request_id]
@purchase_re... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/concerns/enju_circulation/controller.rb | app/controllers/concerns/enju_circulation/controller.rb | module EnjuCirculation
module Controller
extend ActiveSupport::Concern
def get_checkout_type
if params[:checkout_type_id]
@checkout_type = CheckoutType.find(params[:checkout_type_id])
authorize @checkout_type, :show?
end
end
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/concerns/enju_subject/controller.rb | app/controllers/concerns/enju_subject/controller.rb | module EnjuSubject
module Controller
private
def get_subject_heading_type
if params[:subject_heading_type_id]
@subject_heading_type = SubjectHeadingType.find(params[:subject_heading_type_id])
authorize @subject_heading_type, :show?
end
end
def get_subject
if params[... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/concerns/enju_biblio/controller.rb | app/controllers/concerns/enju_biblio/controller.rb | module EnjuBiblio
module Controller
extend ActiveSupport::Concern
private
def get_work
@work = Manifestation.find(params[:work_id]) if params[:work_id]
authorize @work, :show? if @work
end
def get_expression
@expression = Manifestation.find(params[:expression_id]) if params[:e... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/concerns/enju_inventory/controller.rb | app/controllers/concerns/enju_inventory/controller.rb | module EnjuInventory
module Controller
extend ActiveSupport::Concern
def get_inventory_file
@inventory_file = InventoryFile.find(params[:inventory_file_id]) if params[:inventory_file_id]
end
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/concerns/enju_event/controller.rb | app/controllers/concerns/enju_event/controller.rb | module EnjuEvent
module Controller
private
def get_event
if params[:event_id]
@event = Event.find(params[:event_id])
authorize @event, :show?
end
end
end
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/concerns/enju_event/enju_libraries_controller.rb | app/controllers/concerns/enju_event/enju_libraries_controller.rb | module EnjuEvent
module EnjuLibrariesController
extend ActiveSupport::Concern
def show
search = Sunspot.new_search(Event)
library_id = @library.id
search.build do
with(:library_id).equal_to library_id
order_by(:start_at, :desc)
end
page = params[:event_page] || 1... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/concerns/enju_library/controller.rb | app/controllers/concerns/enju_library/controller.rb | module EnjuLibrary
module Controller
extend ActiveSupport::Concern
included do
before_action :get_library_group, :set_locale, :set_available_languages, :set_mobile_request
before_action :store_current_location, unless: :devise_controller?
rescue_from Pundit::NotAuthorizedError, with: :rende... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/active_storage/blobs/proxy_controller.rb | app/controllers/active_storage/blobs/proxy_controller.rb | class ActiveStorage::Blobs::ProxyController < ActiveStorage::BaseController
include ActiveStorage::SetBlob
include ActiveStorage::Streaming
include Pundit::Authorization
def show
@blob.attachments.each do |attachment|
authorize attachment.record
end
if request.headers["Range"].present?
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/controllers/active_storage/blobs/redirect_controller.rb | app/controllers/active_storage/blobs/redirect_controller.rb | class ActiveStorage::Blobs::RedirectController < ActiveStorage::BaseController
include ActiveStorage::SetBlob
include Pundit::Authorization
def show
@blob.attachments.each do |attachment|
authorize attachment.record
end
expires_in ActiveStorage.service_urls_expire_in
redirect_to @blob.url(... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/periodical.rb | app/models/periodical.rb | class Periodical < ApplicationRecord
belongs_to :manifestation
belongs_to :frequency
has_many :periodical_and_manifestations, dependent: :destroy
has_many :manifestations, through: :periodical_and_manifestations
validates :original_title, presence: true
end
# == Schema Information
#
# Table name: periodical... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/news_feed.rb | app/models/news_feed.rb | class NewsFeed < ApplicationRecord
default_scope { order("news_feeds.position") }
belongs_to :library_group
validates :title, :url, presence: true
validates :url, length: { maximum: 255 }
before_save :fetch
acts_as_list
def self.per_page
10
end
def fetch
begin
feed = Faraday.get(url)... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/tag.rb | app/models/tag.rb | class Tag < ApplicationRecord
has_many :taggings, dependent: :destroy, class_name: "ActsAsTaggableOn::Tagging"
validates :name, presence: true
after_destroy :save_taggings
after_save :save_taggings
extend FriendlyId
friendly_id :name
searchable do
text :name
string :name
time :created_at
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/agent.rb | app/models/agent.rb | class Agent < ApplicationRecord
include EnjuNdl::EnjuAgent
scope :readable_by, lambda { |user|
if user
where("required_role_id <= ?", user.try(:user_has_role).try(:role_id))
else
where("required_role_id <= 1")
end
}
has_many :creates, dependent: :destroy
has_many :works, through: :cre... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/identifier_type.rb | app/models/identifier_type.rb | class IdentifierType < ApplicationRecord
include MasterModel
has_many :identifiers, dependent: :destroy
validates :name, format: { with: /\A[0-9a-z][0-9a-z_\-]*[0-9a-z]\Z/ }
end
# == Schema Information
#
# Table name: identifier_types
#
# id :bigint not null, primary key
# display_name :tex... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/budget_type.rb | app/models/budget_type.rb | class BudgetType < ApplicationRecord
include MasterModel
validates :name, presence: true, format: { with: /\A[0-9A-Za-z][0-9A-Za-z_\-\s,]*[0-9a-z]\Z/ }
has_many :items, dependent: :restrict_with_exception
private
def valid_name?
true
end
end
# == Schema Information
#
# Table name: budget_types
#
# i... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/checkin.rb | app/models/checkin.rb | class Checkin < ApplicationRecord
default_scope { order("checkins.id DESC") }
scope :on, lambda { |date| where("created_at >= ? AND created_at < ?", date.beginning_of_day, date.tomorrow.beginning_of_day) }
has_one :checkout
belongs_to :item, touch: true
belongs_to :librarian, class_name: "User"
belongs_to :... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/subscription.rb | app/models/subscription.rb | class Subscription < ApplicationRecord
has_many :subscribes, dependent: :destroy
has_many :works, through: :subscribes
belongs_to :user
if defined?(EnjuPurchasRequest)
belongs_to :order_list
end
validates :title, presence: :title
searchable do
text :title, :note
time :created_at
time :up... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/user_reserve_stat_transition.rb | app/models/user_reserve_stat_transition.rb | class UserReserveStatTransition < ApplicationRecord
belongs_to :user_reserve_stat, inverse_of: :user_reserve_stat_transitions
end
# == Schema Information
#
# Table name: user_reserve_stat_transitions
#
# id :bigint not null, primary key
# metadata :jsonb not null
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/identifier.rb | app/models/identifier.rb | class Identifier < ApplicationRecord
belongs_to :identifier_type
belongs_to :manifestation, touch: true, optional: true
validates :body, presence: true
validates :body, uniqueness: { scope: [ :identifier_type_id, :manifestation_id ] }
validate :check_identifier
before_validation :normalize
before_save :c... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/manifestation_reserve_stat_state_machine.rb | app/models/manifestation_reserve_stat_state_machine.rb | class ManifestationReserveStatStateMachine
include Statesman::Machine
state :pending, initial: true
state :started
state :completed
transition from: :pending, to: :started
transition from: :started, to: :completed
after_transition(to: :started) do |manifestation_reserve_stat|
manifestation_reserve_s... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/frequency.rb | app/models/frequency.rb | class Frequency < ApplicationRecord
include MasterModel
has_many :manifestations, dependent: :restrict_with_exception
end
# == Schema Information
#
# Table name: frequencies
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note :t... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/event_import_file_state_machine.rb | app/models/event_import_file_state_machine.rb | class EventImportFileStateMachine
include Statesman::Machine
state :pending, initial: true
state :started
state :completed
state :failed
transition from: :pending, to: :started
transition from: :started, to: [ :completed, :failed ]
after_transition(from: :pending, to: :started) do |event_import_file|... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/language.rb | app/models/language.rb | class Language < ApplicationRecord
include MasterModel
# If you wish to change the field names for brevity, feel free to enable/modify these.
# alias_attribute :iso1, :iso_639_1
# alias_attribute :iso2, :iso_639_2
# alias_attribute :iso3, :iso_639_3
# Validations
validates :iso_639_1, presence: true # , ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/agent_merge_list.rb | app/models/agent_merge_list.rb | class AgentMergeList < ApplicationRecord
has_many :agent_merges, dependent: :destroy
has_many :agents, through: :agent_merges
validates :title, presence: true
paginates_per 10
def merge_agents(selected_agent)
agents.each do |agent|
Create.where(agent_id: selected_agent.id).update(agent_id: agent.i... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/place.rb | app/models/place.rb | class Place < ApplicationRecord
has_many :events, dependent: :destroy
validates :term, presence: true
end
# == Schema Information
#
# Table name: places
#
# id :bigint not null, primary key
# city :text
# latitude :float
# longitude :float
# term :string
# created_at :datetim... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/medium_of_performance.rb | app/models/medium_of_performance.rb | class MediumOfPerformance < ApplicationRecord
include MasterModel
has_many :works, class_name: "Manifestation"
end
# == Schema Information
#
# Table name: medium_of_performances
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/import_request_state_machine.rb | app/models/import_request_state_machine.rb | class ImportRequestStateMachine
include Statesman::Machine
state :pending, initial: true
state :completed
state :failed
transition from: :pending, to: [ :completed, :failed ]
end
| ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/url_validator.rb | app/models/url_validator.rb | class UrlValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
if value =~ /\Ahttps?:\/\/[^\n]+\z/i
url = ::Addressable::URI.parse(value)
unless [ "http", "https" ].include?(url.scheme)
record.errors.add(attribute.to_sym)
end
else
record.errors.add(... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/reserve_stat_has_manifestation.rb | app/models/reserve_stat_has_manifestation.rb | class ReserveStatHasManifestation < ApplicationRecord
belongs_to :manifestation_reserve_stat
belongs_to :manifestation
validates :manifestation_id, uniqueness: { scope: :manifestation_reserve_stat_id }
paginates_per 10
end
# == Schema Information
#
# Table name: reserve_stat_has_manifestations
#
# id ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/manifestation_reserve_stat_transition.rb | app/models/manifestation_reserve_stat_transition.rb | class ManifestationReserveStatTransition < ApplicationRecord
belongs_to :manifestation_reserve_stat, inverse_of: :manifestation_reserve_stat_transitions
end
# == Schema Information
#
# Table name: manifestation_reserve_stat_transitions
#
# id :bigint not null, primary key
# met... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/item_custom_property.rb | app/models/item_custom_property.rb | class ItemCustomProperty < ApplicationRecord
include MasterModel
validates :name, presence: true, uniqueness: true
acts_as_list
end
# == Schema Information
#
# Table name: item_custom_properties
#
# id :bigint not null, primary key
# display_name(表示名) :text not null
# n... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/agent_merge.rb | app/models/agent_merge.rb | class AgentMerge < ApplicationRecord
belongs_to :agent
belongs_to :agent_merge_list
paginates_per 10
end
# == Schema Information
#
# Table name: agent_merges
#
# id :bigint not null, primary key
# created_at :datetime not null
# updated_at :datetime ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/jpno_record.rb | app/models/jpno_record.rb | class JpnoRecord < ApplicationRecord
belongs_to :manifestation
validates :body, presence: true, uniqueness: true
strip_attributes
end
# == Schema Information
#
# Table name: jpno_records
#
# id :bigint not null, primary key
# body :string not null
# created_at ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/user_checkout_stat_transition.rb | app/models/user_checkout_stat_transition.rb | class UserCheckoutStatTransition < ApplicationRecord
belongs_to :user_checkout_stat, inverse_of: :user_checkout_stat_transitions
end
# == Schema Information
#
# Table name: user_checkout_stat_transitions
#
# id :bigint not null, primary key
# metadata :jsonb not... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/cinii_book.rb | app/models/cinii_book.rb | class CiniiBook
def initialize(node)
@node = node
end
def title
@node.at("./xmlns:title").try(:content)
end
def creator
@node.at("./dc:creator").try(:content)
end
def publisher
@node.at("./dc:publisher").try(:content)
end
def link
@node.at("./xmlns:link").try(:content)
end
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/library.rb | app/models/library.rb | class Library < ApplicationRecord
include MasterModel
include EnjuEvent::EnjuLibrary
default_scope { order("libraries.position") }
scope :real, -> { where("id != 1") }
has_many :shelves, -> { order("shelves.position") }, dependent: :destroy, inverse_of: :library
belongs_to :library_group
has_many :profil... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/event.rb | app/models/event.rb | class Event < ApplicationRecord
scope :closing_days, -> { includes(:event_category).where("event_categories.name" => "closed") }
scope :on, lambda { |datetime|
where("start_at >= ? AND start_at < ?", datetime.beginning_of_day, datetime.tomorrow.beginning_of_day + 1)
}
scope :past, lambda { |datetime|
wh... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/manifestation_custom_property.rb | app/models/manifestation_custom_property.rb | class ManifestationCustomProperty < ApplicationRecord
include MasterModel
validates :name, presence: true, uniqueness: true
acts_as_list
end
# == Schema Information
#
# Table name: manifestation_custom_properties
#
# id :bigint not null, primary key
# display_name(表示名) :text ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/shelf.rb | app/models/shelf.rb | class Shelf < ApplicationRecord
include MasterModel
scope :real, -> { where("library_id != 1") }
belongs_to :library
has_many :items, dependent: :restrict_with_exception
has_many :picture_files, as: :picture_attachable, dependent: :destroy
validates :display_name, uniqueness: { scope: :library_id }
valid... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/donate.rb | app/models/donate.rb | class Donate < ApplicationRecord
belongs_to :agent
belongs_to :item
end
# == Schema Information
#
# Table name: donates
#
# id :bigint not null, primary key
# created_at :datetime not null
# updated_at :datetime not null
# agent_id :bigint not null
# item_id :b... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/content_type.rb | app/models/content_type.rb | class ContentType < ApplicationRecord
include MasterModel
has_many :manifestations, dependent: :restrict_with_exception
end
# == Schema Information
#
# Table name: content_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/order.rb | app/models/order.rb | class Order < ApplicationRecord
belongs_to :order_list, validate: true
belongs_to :purchase_request, validate: true
validates_associated :order_list, :purchase_request
validates_presence_of :order_list, :purchase_request
validates_uniqueness_of :purchase_request_id, scope: :order_list_id
after_save :reind... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/nii_type.rb | app/models/nii_type.rb | class NiiType < ApplicationRecord
include MasterModel
has_many :manifestations, dependent: :destroy
end
# == Schema Information
#
# Table name: nii_types
#
# id :bigint not null, primary key
# display_name :text
# name :string not null
# note :text
# position ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/resource_export_file.rb | app/models/resource_export_file.rb | class ResourceExportFile < ApplicationRecord
include Statesman::Adapters::ActiveRecordQueries[
transition_class: ResourceExportFileTransition,
initial_state: ResourceExportFileStateMachine.initial_state
]
include ExportFile
has_one_attached :attachment
has_many :resource_export_file_transitions, aut... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/ncid_record.rb | app/models/ncid_record.rb | class NcidRecord < ApplicationRecord
belongs_to :manifestation
validates :body, presence: true, uniqueness: true
strip_attributes
end
# == Schema Information
#
# Table name: ncid_records
#
# id :bigint not null, primary key
# body :string not null
# created_at ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/user_export_file_transition.rb | app/models/user_export_file_transition.rb | class UserExportFileTransition < ApplicationRecord
belongs_to :user_export_file, inverse_of: :user_export_file_transitions
end
# == Schema Information
#
# Table name: user_export_file_transitions
#
# id :bigint not null, primary key
# metadata :jsonb not null
# mos... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/identity.rb | app/models/identity.rb | class Identity < ApplicationRecord
belongs_to :profile
validates :name, presence: true, uniqueness: { scope: :provider }
validates :provider, presence: true
def self.find_for_oauth(auth)
where(name: auth.uid, provider: auth.provider).first_or_create
end
end
# == Schema Information
#
# Table name: identi... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/license.rb | app/models/license.rb | class License < ApplicationRecord
include MasterModel
end
# == Schema Information
#
# Table name: licenses
#
# id :bigint not null, primary key
# display_name :string
# name :string not null
# note :text
# position :integer
# created_at :datetime not ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/reserve_stat_has_user.rb | app/models/reserve_stat_has_user.rb | class ReserveStatHasUser < ApplicationRecord
belongs_to :user_reserve_stat
belongs_to :user
validates :user_id, uniqueness: { scope: :user_reserve_stat_id }
paginates_per 10
end
# == Schema Information
#
# Table name: reserve_stat_has_users
#
# id :bigint not null, primary key
# ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/purchase_request.rb | app/models/purchase_request.rb | class PurchaseRequest < ApplicationRecord
scope :not_ordered, -> { includes(:order_list).where("order_lists.ordered_at IS NULL") }
scope :ordered, -> { includes(:order_list).where("order_lists.ordered_at IS NOT NULL") }
belongs_to :user, validate: true
has_one :order, dependent: :destroy
has_one :order_list,... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/user_group.rb | app/models/user_group.rb | class UserGroup < ApplicationRecord
include MasterModel
include EnjuCirculation::EnjuUserGroup
has_many :profiles, dependent: :destroy
validates :valid_period_for_new_user,
numericality: { greater_than_or_equal_to: 0,
allow_blank: true }
paginates_per 10
end
# == Schema Information
#
# Table name: ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/agent_import_file.rb | app/models/agent_import_file.rb | class AgentImportFile < ApplicationRecord
include Statesman::Adapters::ActiveRecordQueries[
transition_class: AgentImportFileTransition,
initial_state: AgentImportFileStateMachine.initial_state
]
include ImportFile
default_scope { order("agent_import_files.id DESC") }
scope :not_imported, -> { in_stat... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/periodical_and_manifestation.rb | app/models/periodical_and_manifestation.rb | class PeriodicalAndManifestation < ApplicationRecord
belongs_to :periodical
belongs_to :manifestation
end
# == Schema Information
#
# Table name: periodical_and_manifestations
#
# id :bigint not null, primary key
# created_at :datetime not null
# updated_at :datetime ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/isbn_record.rb | app/models/isbn_record.rb | class IsbnRecord < ApplicationRecord
has_many :isbn_record_and_manifestations, dependent: :destroy
has_many :manifestations, through: :isbn_record_and_manifestations
before_save :normalize_isbn
validates :body, presence: true
strip_attributes
def self.new_records(isbn_records_params)
return [] unless i... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/issn_record_and_manifestation.rb | app/models/issn_record_and_manifestation.rb | class IssnRecordAndManifestation < ApplicationRecord
belongs_to :issn_record
belongs_to :manifestation
validates :issn_record_id, uniqueness: { scope: :manifestation_id }
end
# == Schema Information
#
# Table name: issn_record_and_manifestations(書誌とISSNの関係)
#
# id :bigint not null, prima... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/event_import_result.rb | app/models/event_import_result.rb | class EventImportResult < ApplicationRecord
scope :file_id, proc { |file_id| where(event_import_file_id: file_id) }
scope :failed, -> { where(event_id: nil) }
belongs_to :event_import_file
belongs_to :event, optional: true
def self.header
%w[
id name display_name library event_category start_at en... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/models/oai_provider.rb | app/models/oai_provider.rb | class OaiProvider < OAI::Provider::Base
library_group = LibraryGroup.site_config
if library_group
repository_name library_group.display_name
admin_email library_group.email
end
repository_url EnjuOai::OaiModel.repository_url
record_prefix EnjuOai::OaiModel.record_prefix
source_model OAI::Provider::A... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.