Module: Markaby::Rails::Helpers
- Defined in:
- lib/markaby/rails/current.rb
Instance Method Summary collapse
- #capture(*args, &block) ⇒ Object
-
#url_for(options = {}) ⇒ Object
allow fragments to act as strings.
Instance Method Details
#capture(*args, &block) ⇒ Object
70 71 72 73 74 75 76 |
# File 'lib/markaby/rails/current.rb', line 70 def capture(*args, &block) if output_buffer.kind_of?(Markaby::Builder) output_buffer.capture(&block) else super end end |
#url_for(options = {}) ⇒ Object
allow fragments to act as strings. url_for has a case statment in it:
case options when String
...
which essential is doing the following:
String === options
That assertion fails with Markaby::Fragments, which are essential builder/string fragments.
61 62 63 64 65 66 67 68 |
# File 'lib/markaby/rails/current.rb', line 61 def url_for(={}) case when Markaby::Fragment super(.to_s) else super end end |