small fixes

This commit is contained in:
John Bintz 2013-07-04 08:43:03 -04:00
parent 3b6863a124
commit 9579887857
2 changed files with 4 additions and 2 deletions

View File

@ -182,7 +182,7 @@ def within_any(search, &block)
nodes.each_with_index do |node, index| nodes.each_with_index do |node, index|
begin begin
within("#{search}:nth-child(#{index + 1})", &block) within(node, &block)
return true return true
rescue RSpec::Expectations::ExpectationNotMetError, Capybara::ElementNotFound => e rescue RSpec::Expectations::ExpectationNotMetError, Capybara::ElementNotFound => e
exceptions << e exceptions << e

View File

@ -21,7 +21,9 @@ module SemanticRailsViewHelpers
options = args.pop options = args.pop
end end
link_to t(".#{route}"), send("#{route}_path", *args), semantic_link_data(route).merge(options) label = options.delete(:label) || t(".#{route}")
link_to label, send("#{route}_path", *args), semantic_link_data(route).merge(options)
end end
def link_to_collection(route, options = {}) def link_to_collection(route, options = {})