ruby on rails - Nested taxon url is no longer working -


this seems work on local, not on production.

the number 4 in error tells me returning nil 4 of taxon links.

anyone know else can into?

i clicked link :

<a href="/t/shirts/">shirts</a> 

my error

activerecord::recordnotfound (couldn't find taxon id=4): 

my routes

match '/t/*id' => 'taxons#show', :as => :nested_taxons  #produces line nested_taxons   /t/*id(.:format)   {:controller=>"taxons", :action=>"show"} 

taxons controller

class taxonscontroller < spree::basecontroller   #prepend_before_filter :reject_unknown_object, :only => [:show]   before_filter :load_data, :only => :show   resource_controller   actions :show   helper :products    private   def load_data     @taxon ||= object     params[:taxon] = @taxon.id     @searcher = spree::config.searcher_class.new(params)     @products = @searcher.retrieve_products   end    def object     @object ||= end_of_association_chain.find_by_permalink(params[:id] + "/")   end    def accurate_title     @taxon ? @taxon.name : nil   end end 

none of permalinks in database end /. might have luck if remove trailing slash find_by_permalink call.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -