Module: Crud
- Defined in:
- app/models/crud/klass_info.rb,
lib/crud.rb,
lib/crud/engine.rb,
lib/crud/version.rb,
app/models/crud/klass_list.rb,
app/helpers/crud/crud_helper.rb,
app/jobs/crud/application_job.rb,
app/helpers/crud/dashboard_helper.rb,
app/models/crud/application_record.rb,
app/helpers/crud/application_helper.rb,
app/mailers/crud/application_mailer.rb,
app/controllers/crud/crud_controller.rb,
app/models/crud/menus/development_menu.rb,
app/controllers/crud/crud_base_controller.rb,
app/controllers/crud/dashboard_controller.rb,
app/controllers/crud/application_controller.rb
Overview
Development Menu
Defined Under Namespace
Modules: ApplicationHelper, CrudHelper, DashboardHelper, VERSION Classes: ApplicationController, ApplicationJob, ApplicationMailer, ApplicationRecord, CrudBaseController, CrudController, DashboardController, Engine, KlassInfo, KlassList
Class Method Summary collapse
-
.gem_version ⇒ Object
Returns the version of the currently loaded gem as a
Gem::Version. -
.is_allowed_to_update ⇒ Object
self.is_allowed_to_update = false.
-
.is_allowed_to_view ⇒ Object
self.is_allowed_to_view = true.
- .mounted_path ⇒ Object
- .railtie_name ⇒ Object
- .root_path ⇒ Object
-
.setup {|_self| ... } ⇒ Object
Default way to setup the engine.
- .version ⇒ Object
Class Method Details
.gem_version ⇒ Object
Returns the version of the currently loaded gem as a Gem::Version
3 4 5 |
# File 'lib/crud/version.rb', line 3 def self.gem_version Gem::Version.new VERSION::STRING end |
.is_allowed_to_update ⇒ Object
self.is_allowed_to_update = false
43 44 45 46 47 48 |
# File 'lib/crud.rb', line 43 def self.is_allowed_to_update is_allowed = @@is_allowed_to_update.nil? ? lambda { |controller| return true } : lambda {|controller| return ((@@is_allowed_to_update.class == Proc) ? @@is_allowed_to_update.call(controller) : @@is_allowed_to_update)} is_allowed end |
.is_allowed_to_view ⇒ Object
self.is_allowed_to_view = true
32 33 34 35 36 37 |
# File 'lib/crud.rb', line 32 def self.is_allowed_to_view is_allowed = @@is_allowed_to_view.nil? ? lambda { return true } : lambda {|controller| return ((@@is_allowed_to_view.class == Proc) ? @@is_allowed_to_view.call(controller) : @@is_allowed_to_view)} is_allowed end |
.mounted_path ⇒ Object
132 133 134 |
# File 'lib/crud.rb', line 132 def self.mounted_path ::Crud::Engine.mounted_path end |
.railtie_name ⇒ Object
128 129 130 |
# File 'lib/crud.rb', line 128 def self.railtie_name ::Crud::Engine.railtie_name end |
.root_path ⇒ Object
136 137 138 |
# File 'lib/crud.rb', line 136 def self.root_path ::Crud::Engine.root end |
.setup {|_self| ... } ⇒ Object
Default way to setup the engine.
Run ‘rails generate crud_install’ to create a fresh initializer with all configuration values.
124 125 126 |
# File 'lib/crud.rb', line 124 def self.setup yield self end |