Exception: Fortitude::Errors::NoBlockToYieldTo
- Defined in:
- lib/fortitude/errors.rb
Instance Attribute Summary collapse
-
#widget ⇒ Object
readonly
Returns the value of attribute widget.
Instance Method Summary collapse
-
#initialize(widget) ⇒ NoBlockToYieldTo
constructor
A new instance of NoBlockToYieldTo.
Constructor Details
#initialize(widget) ⇒ NoBlockToYieldTo
Returns a new instance of NoBlockToYieldTo.
156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/fortitude/errors.rb', line 156 def initialize() super(%{You're trying to call 'yield' (or 'yield_from_widget', or the Erector-compatibility method 'call_block') from the widget #{}; however, there is nothing to yield to. Fortitude looks for something to yield to in this order: 1. A block passed to a yield at render time directly (usually via the 'widget' call); 2. A block passed to the constructor of the widget; 3. The layout the widget is being rendered in. None of these exist here, and so calling 'yield', 'yield_from_widget', or 'call_block' is an undefined operation.}) @widget = end |
Instance Attribute Details
#widget ⇒ Object (readonly)
Returns the value of attribute widget.
154 155 156 |
# File 'lib/fortitude/errors.rb', line 154 def @widget end |