Notes posted by stevenspiel
RSS feed
0 thanks
Passing a block does not behave as expected
When the condition is true, the block is not rendered:
<%= link_to_if true, users_path, {}, {} do %> <i class='fa fa-star'></i> <% end %>
renders:
<a href="/users">/users</a>
But if the condition is false, the block will render:
<%= link_to_if false, users_path, {}, {} do %> <i class='fa fa-star'></i> <% end %>
renders:
<i class='fa fa-star'></i>

0 thanks
If condition is false, options hash is ignored
Here, the class will be ignored:
<%= link_to_if false, 'Home', root_path, class: 'link' %> #=> Home

0 thanks
4.0.2 support
Where did this go in 4.0.2?