Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove warning "`*' interpreted as argument prefix" #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/gretel/crumb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def initialize(context, key, *args)
raise ArgumentError, "Breadcrumb :#{key} not found." unless block
@key = key
@context = context
instance_exec *args, &block
instance_exec(*args, &block)
end

# Sets link of the breadcrumb.
Expand Down
6 changes: 3 additions & 3 deletions lib/gretel/renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def links_for_render(options = {})

# Handle autoroot
if options[:autoroot] && out.map(&:key).exclude?(:root) && Gretel::Crumbs.crumb_defined?(:root)
out.unshift *Gretel::Crumb.new(context, :root).links
out.unshift(*Gretel::Crumb.new(context, :root).links)
end

# Set current link to actual path
Expand Down Expand Up @@ -114,7 +114,7 @@ def links
links = crumb.links.dup

# Get parent links
links.unshift *parent_links_for(crumb)
links.unshift(*parent_links_for(crumb))

links
else
Expand All @@ -126,7 +126,7 @@ def links
def parent_links_for(crumb)
links = []
while crumb = crumb.parent
links.unshift *crumb.links
links.unshift(*crumb.links)
end
links
end
Expand Down