hi guys,
Using breadcrumbs on rails (http://github.com/weppos/
breadcrumbs_on_rails), I have added a method, "set_breadcrumb" in my
application controller.
That will set up my home breadcrumb.
In my other feedbacks controller, I have the same "set_breadcrumb"
method (in a before_filter). The breadcrumb added here is called
"feedback".
the problem is that when the app runs and I load http://myapp:3000/feedback,
I get
"feedback > feedback" as the breadcrumb.
What''s happened is that rails got confused and is looking at the most
local copy of the "set_breadcrumb" method.
I think part of the solution is to use a "self.set_breadcrumb" but
couldn''t find more to read up on....
My question is, how do we localise a method in a controller such that
when I call ":before_filter" in that controller, the local version is
used, whilst when the application controller calls the same method, it
uses the copy that is defined in the application_controller itself?
thanks :)
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.