Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
Object#with_options
without a block
When the block argument is omitted, the decorated Object instance is returned: ```ruby # app/helpers/my_styled_helpers.rb module MyStyledHelpers def styled with_options style: "color: red;" end end # styled.link_to "I'm red", "/" # #=> <a href="/" style="color: red;">I'm red</a> # styled.button_tag "I'm red too!" # #=> <button style="color: red;">I'm red too!</button> ```
- Loading branch information
1 parent
15f6113
commit 8dc27b5
Showing
4 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters