Module: Ueditor
- Defined in:
- lib/ueditor.rb,
lib/ueditor/utils.rb,
lib/ueditor/config.rb,
lib/ueditor/engine.rb,
lib/ueditor/version.rb,
lib/ueditor/helpers/form_helper.rb,
lib/ueditor/helpers/form_builder.rb,
lib/ueditor/helpers/form_tag_helper.rb,
lib/ueditor/helpers/asset_tag_helper.rb
Defined Under Namespace
Modules: Helpers, Utils Classes: Configuration, Engine
Constant Summary collapse
- VERSION =
"0.0.2"
Class Method Summary collapse
- .assets ⇒ Object
-
.config ⇒ Object
Global settings for Ueditor.
-
.configure {|@config ||= Ueditor::Configuration.new| ... } ⇒ Object
Configures global settings for Ueditor Ueditor.configure do |config| config.default_per_page = 10 end.
- .root_path ⇒ Object
Class Method Details
.assets ⇒ Object
21 22 23 24 25 26 |
# File 'lib/ueditor.rb', line 21 def self.assets Dir[root_path.join('app/assets/javascripts/ueditor/**', '*.{js,css}')].inject([]) do |list, path| list << Pathname.new(path).relative_path_from(root_path.join('app/assets/javascripts')) list end << "ueditor.js" end |
.config ⇒ Object
Global settings for Ueditor
13 14 15 |
# File 'lib/ueditor/config.rb', line 13 def self.config @config end |
.configure {|@config ||= Ueditor::Configuration.new| ... } ⇒ Object
Configures global settings for Ueditor
Ueditor.configure do |config|
config.default_per_page = 10
end
8 9 10 |
# File 'lib/ueditor/config.rb', line 8 def self.configure(&block) yield @config ||= Ueditor::Configuration.new end |
.root_path ⇒ Object
17 18 19 |
# File 'lib/ueditor.rb', line 17 def self.root_path @root_path ||= Pathname.new( File.dirname(File.('../', __FILE__)) ) end |