module Crud
Public Class Methods
gem_version()
click to toggle source
Returns the version of the currently loaded gem as a Gem::Version
# File lib/crud/version.rb 3 def self.gem_version 4 Gem::Version.new VERSION::STRING 5 end
is_allowed_to_update()
click to toggle source
self.is_allowed_to_update = false
# File lib/crud.rb 43 def self.is_allowed_to_update 44 is_allowed = @@is_allowed_to_update.nil? ? lambda { |controller| return true } : 45 lambda {|controller| return ((@@is_allowed_to_update.class == Proc) ? @@is_allowed_to_update.call(controller) : @@is_allowed_to_update)} 46 47 is_allowed 48 end
is_allowed_to_view()
click to toggle source
self.is_allowed_to_view = true
# File lib/crud.rb 32 def self.is_allowed_to_view 33 is_allowed = @@is_allowed_to_view.nil? ? lambda { return true } : 34 lambda {|controller| return ((@@is_allowed_to_view.class == Proc) ? @@is_allowed_to_view.call(controller) : @@is_allowed_to_view)} 35 36 is_allowed 37 end
mounted_path()
click to toggle source
# File lib/crud.rb 132 def self.mounted_path 133 ::Crud::Engine.mounted_path 134 end
railtie_name()
click to toggle source
# File lib/crud.rb 128 def self.railtie_name 129 ::Crud::Engine.railtie_name 130 end
root_path()
click to toggle source
# File lib/crud.rb 136 def self.root_path 137 ::Crud::Engine.root 138 end
setup() { |self| ... }
click to toggle source
Default way to setup the engine.
Run 'rails generate crud_install' to create a fresh initializer with all configuration values.
# File lib/crud.rb 124 def self.setup 125 yield self 126 end
version()
click to toggle source
# File lib/crud/version.rb 7 def self.version 8 VERSION::STRING.to_f 9 end