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/policies/event_import_file_policy.rb | app/policies/event_import_file_policy.rb | class EventImportFilePolicy < ApplicationPolicy
def index?
user.try(:has_role?, "Librarian")
end
def show?
user.try(:has_role?, "Librarian")
end
def create?
user.try(:has_role?, "Librarian")
end
def update?
user.try(:has_role?, "Librarian")
end
def destroy?
user.try(:has_role?,... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/policies/frequency_policy.rb | app/policies/frequency_policy.rb | class FrequencyPolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
end
def destroy?
if user.try(:has_role?, "Administrator")
true if recor... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/policies/resource_export_file_policy.rb | app/policies/resource_export_file_policy.rb | class ResourceExportFilePolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
true if user.try(:has_role?, "Librarian")
end
def update?
true if user.try(:has_role?, "Librarian")
end
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/policies/produce_type_policy.rb | app/policies/produce_type_policy.rb | class ProduceTypePolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
end
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/policies/own_policy.rb | app/policies/own_policy.rb | class OwnPolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
true if user.try(:has_role?, "Librarian")
end
def update?
true if user.try(:has_role?, "Librarian")
end
def destroy?
true if user.try(:has_role?, "Librarian")
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/policies/reserve_policy.rb | app/policies/reserve_policy.rb | class ReservePolicy < ApplicationPolicy
def index?
user.try(:has_role?, "User")
end
def show?
if user.try(:has_role?, "Librarian")
true
elsif user && (user == record.user)
true
end
end
def create?
if user.try(:has_role?, "Librarian")
true
elsif user.try(:has_role?, ... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/policies/country_policy.rb | app/policies/country_policy.rb | class CountryPolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
end
def destroy?
true if user.try(:has_role?, "Administrator")
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/policies/manifestation_relationship_policy.rb | app/policies/manifestation_relationship_policy.rb | class ManifestationRelationshipPolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
true if user.try(:has_role?, "Librarian")
end
def update?
true if user.try(:has_role?, "Librarian")
end
def destroy?
true if user.try(:has_role?, "Librarian")
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/policies/user_reserve_stat_policy.rb | app/policies/user_reserve_stat_policy.rb | class UserReserveStatPolicy < ApplicationPolicy
def index?
user.try(:has_role?, "Librarian")
end
def show?
user.try(:has_role?, "Librarian")
end
def create?
user.try(:has_role?, "Librarian")
end
def update?
user.try(:has_role?, "Librarian")
end
def destroy?
user.try(:has_role?,... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/policies/manifestation_reserve_stat_policy.rb | app/policies/manifestation_reserve_stat_policy.rb | class ManifestationReserveStatPolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
user.try(:has_role?, "Librarian")
end
def update?
user.try(:has_role?, "Librarian")
end
def destroy?
user.try(:has_role?, "Librarian")
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/policies/item_has_use_restriction_policy.rb | app/policies/item_has_use_restriction_policy.rb | class ItemHasUseRestrictionPolicy < ApplicationPolicy
def index?
user.try(:has_role?, "Librarian")
end
def show?
user.try(:has_role?, "Librarian")
end
def create?
user.try(:has_role?, "Administrator")
end
def update?
user.try(:has_role?, "Administrator")
end
def destroy?
user.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/policies/item_custom_property_policy.rb | app/policies/item_custom_property_policy.rb | class ItemCustomPropertyPolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
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/policies/use_restriction_policy.rb | app/policies/use_restriction_policy.rb | class UseRestrictionPolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
false
end
def update?
if user.try(:has_role?, "Administrator")
true
end
end
def destroy?
false
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/policies/identifier_type_policy.rb | app/policies/identifier_type_policy.rb | class IdentifierTypePolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
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/policies/oai_policy.rb | app/policies/oai_policy.rb | class OaiPolicy < ApplicationPolicy
def provider?
true
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/policies/form_of_work_policy.rb | app/policies/form_of_work_policy.rb | class FormOfWorkPolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
end
def destroy?
true if user.try(:has_role?, "Administrator")
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/policies/order_list_policy.rb | app/policies/order_list_policy.rb | class OrderListPolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
true if user.try(:has_role?, "Librarian")
end
def update?
true if user.try(:has_role?, "Librarian")
end
def destroy... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/policies/medium_of_performance_policy.rb | app/policies/medium_of_performance_policy.rb | class MediumOfPerformancePolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
end
def destroy?
true if user.try(:has_role?, "Administrator")
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/policies/carrier_type_policy.rb | app/policies/carrier_type_policy.rb | class CarrierTypePolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
end
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/policies/checkout_type_policy.rb | app/policies/checkout_type_policy.rb | class CheckoutTypePolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
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/policies/basket_policy.rb | app/policies/basket_policy.rb | class BasketPolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
true if user.try(:has_role?, "Librarian")
end
def update?
true if user.try(:has_role?, "Librarian")
end
def destroy?
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/policies/tag_policy.rb | app/policies/tag_policy.rb | class TagPolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
user.try(:has_role?, "Librarian")
end
def update?
user.try(:has_role?, "Librarian")
end
def destroy?
user.try(:has_role?, "Librarian")
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/policies/agent_policy.rb | app/policies/agent_policy.rb | class AgentPolicy < ApplicationPolicy
class Scope
def initialize(user, scope)
@user = user
@scope = scope
end
def resolve
role_id = user&.role&.id || 1
scope.where("agents.required_role_id <= ?", role_id)
end
private
attr_reader :user, :scope
end
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/policies/bookmark_stat_policy.rb | app/policies/bookmark_stat_policy.rb | class BookmarkStatPolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
user.try(:has_role?, "Librarian")
end
def update?
user.try(:has_role?, "Librarian")
end
def destroy?
user.try(:has_role?, "Administrator")
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/policies/ndl_book_policy.rb | app/policies/ndl_book_policy.rb | class NdlBookPolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def create?
true if user.try(:has_role?, "Librarian")
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/policies/circulation_status_policy.rb | app/policies/circulation_status_policy.rb | class CirculationStatusPolicy < ApplicationPolicy
def index?
true
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
false
end
def update?
if user.try(:has_role?, "Administrator")
true
end
end
def destroy?
false
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/policies/profile_policy.rb | app/policies/profile_policy.rb | class ProfilePolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
case user.try(:role).try(:name)
when "Administrator"
true
when "Librarian"
return true if record == user.profile
true if %w(Librarian User Guest).include?(record.required_... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/policies/manifestation_relationship_type_policy.rb | app/policies/manifestation_relationship_type_policy.rb | class ManifestationRelationshipTypePolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
end
def destroy?
true if user.try(:has_role?, "Administra... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/policies/search_engine_policy.rb | app/policies/search_engine_policy.rb | class SearchEnginePolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
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/policies/agent_import_result_policy.rb | app/policies/agent_import_result_policy.rb | class AgentImportResultPolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def destroy?
false
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/policies/realize_type_policy.rb | app/policies/realize_type_policy.rb | class RealizeTypePolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
end
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/policies/shelf_policy.rb | app/policies/shelf_policy.rb | class ShelfPolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
end
def destroy?
if user.try(:has_role?, "Administrator")
true if record.it... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/policies/accept_policy.rb | app/policies/accept_policy.rb | class AcceptPolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
true if user.try(:has_role?, "Librarian")
end
def update?
true if user.try(:has_role?, "Librarian")
end
def destroy?
... | ruby | MIT | cd3cff6dcc8e67909e1cd0a12c38700b45af6a42 | 2026-01-04T17:52:15.550406Z | false |
next-l/enju_leaf | https://github.com/next-l/enju_leaf/blob/cd3cff6dcc8e67909e1cd0a12c38700b45af6a42/app/policies/request_status_type_policy.rb | app/policies/request_status_type_policy.rb | class RequestStatusTypePolicy < ApplicationPolicy
def index?
true if user.try(:has_role?, "Librarian")
end
def show?
true if user.try(:has_role?, "Librarian")
end
def create?
false
end
def update?
true if user.try(:has_role?, "Administrator")
end
def destroy?
false
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/policies/license_policy.rb | app/policies/license_policy.rb | class LicensePolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
true if user.try(:has_role?, "Administrator")
end
def update?
true if user.try(:has_role?, "Administrator")
end
def destroy?
true if user.try(:has_role?, "Administrator")
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/policies/manifestation_checkout_stat_policy.rb | app/policies/manifestation_checkout_stat_policy.rb | class ManifestationCheckoutStatPolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
user.try(:has_role?, "Librarian")
end
def update?
user.try(:has_role?, "Librarian")
end
def destroy?
user.try(:has_role?, "Librarian")
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/policies/acts_as_taggable_on/tag_policy.rb | app/policies/acts_as_taggable_on/tag_policy.rb | class ActsAsTaggableOn::TagPolicy < ApplicationPolicy
def index?
true
end
def show?
true
end
def create?
user.try(:has_role?, "Librarian")
end
def update?
user.try(:has_role?, "Librarian")
end
def destroy?
user.try(:has_role?, "Librarian")
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/agent_relationship_types_controller.rb | app/controllers/agent_relationship_types_controller.rb | class AgentRelationshipTypesController < ApplicationController
before_action :set_agent_relationship_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /agent_relationship_types
# GET /agent_relationship_types.json
def index
@agent_relations... | 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/participates_controller.rb | app/controllers/participates_controller.rb | class ParticipatesController < ApplicationController
before_action :set_participate, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /participates
# GET /participates.json
def index
@participates = Participate.page(params[:page])
respond_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/request_status_types_controller.rb | app/controllers/request_status_types_controller.rb | class RequestStatusTypesController < ApplicationController
before_action :set_request_status_type, only: [ :show, :edit, :update ]
before_action :check_policy, only: [ :index ]
# GET /request_status_types
# GET /request_status_types.json
def index
@request_status_types = RequestStatusType.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/subjects_controller.rb | app/controllers/subjects_controller.rb | class SubjectsController < ApplicationController
before_action :set_subject, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :prepare_options, only: [ :new, :edit ]
# GET /subjects
# GET /subjects.json
def index
sort = { sort_by: "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/controllers/library_groups_controller.rb | app/controllers/library_groups_controller.rb | class LibraryGroupsController < ApplicationController
before_action :set_library_group, only: [ :show, :edit, :update ]
before_action :check_policy, only: [ :index ]
# GET /library_groups
# GET /library_groups.json
def index
@library_groups = LibraryGroup.all
respond_to do |format|
format.html... | 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/licenses_controller.rb | app/controllers/licenses_controller.rb | class LicensesController < ApplicationController
before_action :set_license, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /licenses
# GET /licenses.json
def index
@licenses = License.order(:position)
respond_to do |format|
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/user_reserve_stats_controller.rb | app/controllers/user_reserve_stats_controller.rb | class UserReserveStatsController < ApplicationController
before_action :set_user_reserve_stat, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
after_action :convert_charset, only: :show
# GET /user_reserve_stats
# GET /user_reserve_stats.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/user_export_files_controller.rb | app/controllers/user_export_files_controller.rb | class UserExportFilesController < ApplicationController
before_action :set_user_export_file, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /user_export_files
# GET /user_export_files.json
def index
@user_export_files = UserExportFile.order("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/controllers/page_controller.rb | app/controllers/page_controller.rb | class PageController < ApplicationController
before_action :skip_authorization
before_action :clear_search_sessions, only: [ :index, :advanced_search ]
before_action :authenticate_user!, except: [ :index, :advanced_search, :about, :opensearch, :statistics, :routing_error ]
before_action :check_librarian, except... | 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/bookstores_controller.rb | app/controllers/bookstores_controller.rb | class BookstoresController < ApplicationController
before_action :set_bookstore, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /bookstores
# GET /bookstores.json
def index
@bookstores = Bookstore.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/oai_controller.rb | app/controllers/oai_controller.rb | class OaiController < ApplicationController
skip_after_action :verify_authorized
def index
provider = OaiProvider.new
response = provider.process_request(oai_params.to_h)
render body: response, content_type: "text/xml"
end
private
def oai_params
params.permit(:verb, :identifier, :metadataPr... | 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/checked_items_controller.rb | app/controllers/checked_items_controller.rb | class CheckedItemsController < ApplicationController
before_action :set_checked_item, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_basket, only: [ :index, :new, :create, :update ]
# GET /checked_items
# GET /checked_items.json
def... | 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/search_engines_controller.rb | app/controllers/search_engines_controller.rb | class SearchEnginesController < ApplicationController
before_action :set_search_engine, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /search_engines
# GET /search_engines.json
def index
@search_engines = SearchEngine.order(:position)
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/subscriptions_controller.rb | app/controllers/subscriptions_controller.rb | class SubscriptionsController < ApplicationController
before_action :set_subscription, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_work
# GET /subscriptions
# GET /subscriptions.json
def index
if @work
@subscriptions = ... | 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/classification_types_controller.rb | app/controllers/classification_types_controller.rb | class ClassificationTypesController < ApplicationController
before_action :set_classification_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /classification_types
# GET /classification_types.json
def index
@classification_types = Classif... | 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/profiles_controller.rb | app/controllers/profiles_controller.rb | class ProfilesController < ApplicationController
before_action :authenticate_user!
before_action :set_profile, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :prepare_options, only: [ :new, :edit ]
# GET /profiles
# GET /profiles.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/mission_control_controller.rb | app/controllers/mission_control_controller.rb | class MissionControlController < ActionController::Base
before_action :authenticate_admin!
private
def authenticate_admin!
authenticate_user!
current_user.role.name == "Administrator"
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/user_checkout_stats_controller.rb | app/controllers/user_checkout_stats_controller.rb | class UserCheckoutStatsController < ApplicationController
before_action :set_user_checkout_stat, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
after_action :convert_charset, only: :show
# GET /user_checkout_stats
# GET /user_checkout_stats.json
def 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/controllers/identifier_types_controller.rb | app/controllers/identifier_types_controller.rb | class IdentifierTypesController < ApplicationController
before_action :set_identifier_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /identifier_types
# GET /identifier_types.json
def index
@identifier_types = IdentifierType.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/agent_import_files_controller.rb | app/controllers/agent_import_files_controller.rb | class AgentImportFilesController < ApplicationController
before_action :set_agent_import_file, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /agent_import_files
# GET /agent_import_files.json
def index
@agent_import_files = AgentImportFile.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/agent_merges_controller.rb | app/controllers/agent_merges_controller.rb | class AgentMergesController < ApplicationController
before_action :set_agent_merge, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_agent, :get_agent_merge_list
# GET /agent_merges
# GET /agent_merges.json
def index
if @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/bookmark_stats_controller.rb | app/controllers/bookmark_stats_controller.rb | class BookmarkStatsController < ApplicationController
before_action :set_bookmark_stat, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
after_action :convert_charset, only: :show
# GET /bookmark_stats
# GET /bookmark_stats.json
def index
@bookmark_... | 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/loc_search_controller.rb | app/controllers/loc_search_controller.rb | class LocSearchController < ApplicationController
before_action :check_policy, only: [ :index, :create ]
def index
if params[:page].to_i <= 0
page = 1
else
page = params[:page].to_i
end
@query = params[:query].to_s.strip
books = LocSearch.search(@query, { page: page })
@books = ... | 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/reserves_controller.rb | app/controllers/reserves_controller.rb | class ReservesController < ApplicationController
before_action :set_reserve, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :prepare_options, only: [ :new, :edit ]
before_action :get_user, only: [ :index, :new ]
before_action :store_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/donates_controller.rb | app/controllers/donates_controller.rb | class DonatesController < ApplicationController
before_action :set_donate, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /donates
# GET /donates.json
def index
@donates = Donate.order("id DESC").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/manifestation_relationships_controller.rb | app/controllers/manifestation_relationships_controller.rb | class ManifestationRelationshipsController < ApplicationController
before_action :set_manifestation_relationship, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_manifestation
before_action :prepare_options, only: [ :new, :edit ]
# 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/event_categories_controller.rb | app/controllers/event_categories_controller.rb | class EventCategoriesController < ApplicationController
before_action :set_event_category, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /event_categories
# GET /event_categories.json
def index
@event_categories = EventCategory.order(:positio... | 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/nii_types_controller.rb | app/controllers/nii_types_controller.rb | class NiiTypesController < ApplicationController
before_action :set_nii_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /nii_types
# GET /nii_types.json
def index
@nii_types = NiiType.order(:position)
respond_to do |format|
for... | 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_files_controller.rb | app/controllers/user_import_files_controller.rb | class UserImportFilesController < ApplicationController
before_action :set_user_import_file, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :prepare_options, only: [ :new, :edit ]
# GET /user_import_files
# GET /user_import_files.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/frequencies_controller.rb | app/controllers/frequencies_controller.rb | class FrequenciesController < ApplicationController
before_action :set_frequency, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /frequencies
# GET /frequencies.json
def index
@frequencies = Frequency.order(:position)
respond_to do |forma... | 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/accepts_controller.rb | app/controllers/accepts_controller.rb | class AcceptsController < ApplicationController
before_action :set_accept, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_basket, only: [ :index, :create ]
# GET /accepts
# GET /accepts.json
def index
if request.format.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/controllers/purchase_requests_controller.rb | app/controllers/purchase_requests_controller.rb | class PurchaseRequestsController < ApplicationController
before_action :store_page, only: :index
before_action :set_purchase_request, only: [ :show, :edit, :update, :destroy ]
before_action :set_order_list
before_action :check_policy, only: [ :index, :new, :create ]
after_action :convert_charset, only: :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/realizes_controller.rb | app/controllers/realizes_controller.rb | class RealizesController < ApplicationController
before_action :set_realize, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_agent, :get_expression
before_action :prepare_options, only: [ :new, :edit ]
# GET /realizes
# GET /realizes... | 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/content_types_controller.rb | app/controllers/content_types_controller.rb | class ContentTypesController < ApplicationController
before_action :set_content_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /content_types
# GET /content_types.json
def index
@content_types = ContentType.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/languages_controller.rb | app/controllers/languages_controller.rb | class LanguagesController < ApplicationController
before_action :set_language, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /languages
# GET /languages.json
def index
@languages = Language.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/import_requests_controller.rb | app/controllers/import_requests_controller.rb | class ImportRequestsController < ApplicationController
before_action :set_import_request, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /import_requests
# GET /import_requests.json
def index
@import_requests = ImportRequest.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/realize_types_controller.rb | app/controllers/realize_types_controller.rb | class RealizeTypesController < ApplicationController
before_action :set_realize_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /realize_types
# GET /realize_types.json
def index
@realize_types = RealizeType.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/tags_controller.rb | app/controllers/tags_controller.rb | class TagsController < ApplicationController
before_action :set_tag, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index ]
def index
session[:params] ={} unless session[:params]
session[:params][:tag] = params
sort = { sort_by: "created_at", order: "desc" }
case... | 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_export_files_controller.rb | app/controllers/resource_export_files_controller.rb | class ResourceExportFilesController < ApplicationController
before_action :set_resource_export_file, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /resource_export_files
# GET /resource_export_files.json
def index
@resource_export_files = Res... | 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/create_types_controller.rb | app/controllers/create_types_controller.rb | class CreateTypesController < ApplicationController
before_action :set_create_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /create_types
# GET /create_types.json
def index
@create_types = CreateType.order(:position)
respond_to do ... | 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/checkouts_controller.rb | app/controllers/checkouts_controller.rb | class CheckoutsController < ApplicationController
before_action :set_checkout, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :remove_all ]
before_action :get_user, only: [ :index, :remove_all ]
before_action :get_item, only: :index
after_action :convert_charset, only: ... | 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/libraries_controller.rb | app/controllers/libraries_controller.rb | class LibrariesController < ApplicationController
before_action :set_library, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /libraries
# GET /libraries.json
def index
sort = { sort_by: "position", order: "asc" }
case params[:sort_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/my_accounts_controller.rb | app/controllers/my_accounts_controller.rb | class MyAccountsController < ApplicationController
before_action :authenticate_user!
before_action :set_profile
def show
respond_to do |format|
format.html
format.html.phone
end
end
def edit
prepare_options
end
def update
respond_to do |format|
@profile.assign_attribut... | 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/medium_of_performances_controller.rb | app/controllers/medium_of_performances_controller.rb | class MediumOfPerformancesController < ApplicationController
before_action :set_medium_of_performance, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /medium_of_performances
# GET /medium_of_performances.json
def index
@medium_of_performances ... | 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/classifications_controller.rb | app/controllers/classifications_controller.rb | class ClassificationsController < ApplicationController
before_action :set_classification, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_subject, :get_classification_type
# GET /classifications
# GET /classifications.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/agent_merge_lists_controller.rb | app/controllers/agent_merge_lists_controller.rb | class AgentMergeListsController < ApplicationController
before_action :set_agent_merge_list, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /agent_merge_lists
# GET /agent_merge_lists.json
def index
@agent_merge_lists = AgentMergeList.page(par... | 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/owns_controller.rb | app/controllers/owns_controller.rb | class OwnsController < ApplicationController
before_action :set_own, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_agent, :get_item
# GET /owns
# GET /owns.json
def index
if @agent
@owns = @agent.owns.order("owns.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/series_statement_merges_controller.rb | app/controllers/series_statement_merges_controller.rb | class SeriesStatementMergesController < ApplicationController
before_action :set_series_statement_merge, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_series_statement, :get_series_statement_merge_list
# GET /series_statement_merges
... | 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_statements_controller.rb | app/controllers/series_statements_controller.rb | class SeriesStatementsController < ApplicationController
before_action :set_series_statement, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_manifestation, except: [ :create, :update, :destroy ]
before_action :get_series_statement_merge_... | 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_files_controller.rb | app/controllers/resource_import_files_controller.rb | class ResourceImportFilesController < ApplicationController
before_action :set_resource_import_file, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :prepare_options, only: [ :new, :edit ]
# GET /resource_import_files
# GET /resource_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/produce_types_controller.rb | app/controllers/produce_types_controller.rb | class ProduceTypesController < ApplicationController
before_action :set_produce_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /produce_types
# GET /produce_types.json
def index
@produce_types = ProduceType.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/event_import_results_controller.rb | app/controllers/event_import_results_controller.rb | class EventImportResultsController < ApplicationController
before_action :set_event_import_result, only: [ :show, :destroy ]
before_action :check_policy, only: [ :index ]
# GET /event_import_results
# GET /event_import_results.json
def index
@event_import_file = EventImportFile.find_by(id: params[:event_... | 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/cinii_books_controller.rb | app/controllers/cinii_books_controller.rb | class CiniiBooksController < ApplicationController
before_action :check_policy, only: [ :index, :create ]
def index
if params[:page].to_i.zero?
page = 1
else
page = params[:page]
end
@query = params[:query].to_s.strip
begin
books = CiniiBook.search(params[:query], 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/checkins_controller.rb | app/controllers/checkins_controller.rb | class CheckinsController < ApplicationController
before_action :set_checkin, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_basket, only: [ :index, :create ]
# GET /checkins
# GET /checkins.json
def index
if @basket
@check... | 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_custom_properties_controller.rb | app/controllers/manifestation_custom_properties_controller.rb | class ManifestationCustomPropertiesController < ApplicationController
before_action :set_manifestation_custom_property, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /manifestation_custom_properties
def index
@manifestation_custom_properties = ... | 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/items_controller.rb | app/controllers/items_controller.rb | class ItemsController < ApplicationController
include EnjuInventory::Controller
before_action :set_item, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_agent, :get_manifestation, :get_shelf, except: [ :create, :update, :destroy ]
befor... | 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/roles_controller.rb | app/controllers/roles_controller.rb | class RolesController < ApplicationController
before_action :set_role, only: [ :show, :edit, :update ]
before_action :check_policy, only: [ :index ]
# GET /roles
# GET /roles.json
def index
@roles = Role.order(:position)
respond_to do |format|
format.html # index.html.erb
end
end
# GE... | 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/checkout_types_controller.rb | app/controllers/checkout_types_controller.rb | class CheckoutTypesController < ApplicationController
before_action :set_checkout_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_user_group
# GET /checkout_types
# GET /checkout_types.json
def index
if @user_group
@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/controllers/subject_heading_types_controller.rb | app/controllers/subject_heading_types_controller.rb | class SubjectHeadingTypesController < ApplicationController
before_action :set_subject_heading_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /subject_heading_types
# GET /subject_heading_types.json
def index
@subject_heading_types = Sub... | 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/budget_types_controller.rb | app/controllers/budget_types_controller.rb | class BudgetTypesController < ApplicationController
before_action :set_budget_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /budget_types
# GET /budget_types.json
def index
@budget_types = BudgetType.order(:position)
respond_to do ... | 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/events_controller.rb | app/controllers/events_controller.rb | class EventsController < ApplicationController
include EnjuEvent::EnjuLibrariesController
before_action :store_page, only: :index
before_action :set_event, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
before_action :get_library, :get_agent
before_act... | 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_types_controller.rb | app/controllers/agent_types_controller.rb | class AgentTypesController < ApplicationController
before_action :set_agent_type, only: [ :show, :edit, :update, :destroy ]
before_action :check_policy, only: [ :index, :new, :create ]
# GET /agent_types
# GET /agent_types.json
def index
@agent_types = AgentType.order(:position)
respond_to do |forma... | 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/inventories_controller.rb | app/controllers/inventories_controller.rb | class InventoriesController < ApplicationController
before_action :set_inventory, only: [ :show ]
before_action :check_policy, only: [ :index ]
# GET /inventories
# GET /inventories.json
def index
@inventories = Inventory.page(params[:page])
respond_to do |format|
format.html # index.html.erb
... | 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.