lib/quill/rails/view_helpers.rb in quill-rails-0.0.2 vs lib/quill/rails/view_helpers.rb in quill-rails-0.1.0
- old
+ new
@@ -1,15 +1,31 @@
+require 'erb'
+
+module Quill
+ module Rails
+ module ViewHelpers
+ def source_root
+ File.dirname(__FILE__) + '/templates'
+ end
+ # A link helper to create a 'default' Quill text edit
+ #
+ def quill_editor(options={})
+ ERB.new(File.read(File.join(source_root, 'template.html.erb'))).result(binding).html_safe
+ end
+ end
+ end
+end
\ No newline at end of file