search for: polymorphic_routes

Displaying 8 results from an estimated 8 matches for "polymorphic_routes".

2008 Dec 20
3
undefined method `stories_path'
...might be related to the helper but I have no idea where to start. It seems to think its failing on the first line of the view, i belive on the ''form_for'' method. heres the traceback: /opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in `__send__'' /opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in `polymorphic_url'' /opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_route...
2011 Feb 09
16
rails 3.0.4 broke yield :javascript ?
hello, I have today updated my rails app to 3.0.4 security release but now this yield :javascripts fails in the layout and I get my custom js escaped as text in the view. anybody seeing this also? tia, jk -- www.least-significant-bit.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to
2009 Jul 13
3
undefined method error from atom builder
...essage - undefined method `order_url'' for #<ActionView::Base: 0x25e3560> Code snippet that''s failing (line 7) - 4: 5: for order in @orders 6: 7: feed.entry(order) do |entry| 8: Stack trace of failure - /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ polymorphic_routes.rb:109:in `__send__'' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_controller/ polymorphic_routes.rb:109:in `polymorphic_url'' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.2/lib/action_view/helpers/ atom_feed_helper.rb:189:in `entry'' /Library/Ruby/Gems/1.8/gems/bui...
2010 Jul 27
13
3.0.0rc ActionController::RoutingError No route matches
Have been developing on 3.0.0beta4 and just updated to 3.0.0.rc. When I try to link_to() a User object that previously had worked, I get the following: ActionView::Template::Error (No route matches {:action=>"destroy", :controller=>"games", :id=>#<User ..... > Yet I have in my routes.rb file has resources :users and my "rake routes" shows:
2012 Aug 07
9
How do I force link_to/form helpers to use the superclass name in the path instead subclass?
I want my helpers to generate paths using a superclass instead of the subclasses. Assuming I have Owner and Member that both inherit from User, rails will use the current objects class name when generating paths: Let''s say current_user is a mod: <%= link_to current_user.name, current_user %> will generate "/mod/:id". I want to force it to generate
2009 Jan 26
0
undefined method error for a polymorphic route
...my polymorphic routes seem to be broken. test_should_create_footerpage(PagesControllerTest): NoMethodError: undefined method `footerpage_url'' for #<PagesController: 0x4814648 > C:/InstantRails2/rails_apps/real_estate_application_2/vendor/rails/ actionpac k/lib/action_controller/polymorphic_routes.rb:105:in `send!'' Has anyone run into anything like this? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh...
2012 Sep 04
0
dynamic route generation
In polymorphic_routes.rb, line 131, a name route that has been built (e.g. post_users_path) gets invoked on self (assuming there was not RoutesProxy instance appended as the first element of the array passed as the first argument to form_for, then send() would be invoked on self, which is PolymorphicRoutes module, which...
2010 Nov 01
2
Creating RESTful helpers on the fly
If I have a resource called ''assets'' then I get for free a bunch of helpers, like assets_path new_asset_path and so forth, right? I would like to be able to create a call to one of these on the fly when I only find out the name of the resource at run time. For example I would like to do this: resource_name = "assets" resource_path(resource_name, method => :new)