lucky icon indicating copy to clipboard operation
lucky copied to clipboard

Add link_to_if and link_to_unless

Open paulcsmith opened this issue 4 years ago • 1 comments

They would work mostly like Rails except it would not have a block version as it is more confusing than helpful (IMO)

link_to_if user.admin?, "Admin", to: Admin::Users::Index
link_to_unless user.admin?, "Admin", to: Admin::Users::Index

paulcsmith avatar Mar 05 '20 00:03 paulcsmith

Actually I don't think this quite does what I wanted and it seems it is very rarely used in the wild. I'll leave this open, but it is not a priority

paulcsmith avatar Mar 05 '20 00:03 paulcsmith