Coder Social home page Coder Social logo

Comments (5)

cui-bo avatar cui-bo commented on July 1, 2024

The same problem, and searching for the result.

from routing-filter.

saevarom avatar saevarom commented on July 1, 2024

I have this same problem, anyone have a solution?
Running on Rails 2.3.8 and routing-filter 0.3.0

from routing-filter.

mjonuschat avatar mjonuschat commented on July 1, 2024

Any more information on your environment? What's the spree version? Any chance of a small app demoing this bug? Looking at spree I can't really find any similarities between the shared/_taxonomies.html.erb supplied in core and the example given in the gist:

<div id="taxonomies" class="sidebar-item">
<% get_taxonomies.each do |taxonomy| %>
  <ul class="navigation-list">
      <li<%= ' class="current"' if @taxon && @taxon == taxonomy.root %>><%= link_to t("shop_by_taxonomy", :taxonomy => taxonomy.name.singularize), seo_url(taxonomy.root), :class => 'root' %></li>
      <% taxonomy.root.children.each do |taxon| %>
        <li<%= ' class="current"' if @taxon and ([@taxon] + @taxon.ancestors).include?(taxon) %>><%= link_to taxon.name, seo_url(taxon) %></li>
      <% end %>
    </ul>
<% end %>
</div>

from routing-filter.

saevarom avatar saevarom commented on July 1, 2024

It looks like I posted my comment on the wrong issue, since I'm not using spree, just plain rails.
Sorry about that.

But anyway, I fixed my problem.
It seems like the default example in the docs does not handle all use cases well.

When I define my around_generate method, it has to be like this:

def around_generate(*args, &block)
  params = args.extract_options!
  my_param = params.delete(:my_param)
  yield.tap do |result|
    #do stuff
  end
end

I think that my problem was caused by the filter being called by url helpers trying to generate a url without my required parameter.

from routing-filter.

mjonuschat avatar mjonuschat commented on July 1, 2024

Closing this one since none of the original posters responded and the latest report is resolved

from routing-filter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.