parent
9dfe9fa693
commit
e13e8dcf44
@ -398,7 +398,7 @@ def link_to_unless_current(name, options = {}, html_options = {}, &block)
|
||||
def link_to_unless(condition, name, options = {}, html_options = {}, &block)
|
||||
if condition
|
||||
if block_given?
|
||||
block.arity <= 1 ? yield(name) : yield(name, options, html_options)
|
||||
block.arity <= 1 ? capture(name, &block) : capture(name, options, html_options, &block)
|
||||
else
|
||||
name
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user