similar to: undefined method error for a polymorphic route

Displaying 12 results from an estimated 12 matches similar to: "undefined method error for a polymorphic route"

2010 Aug 09
0
Expanding tests with own methods
I want to call the method ''url_for'' in my functional test. e.g. assert_select "a[href=?]", url_for(:action => :new), :text => ''Neue Seite'' The book I am reading suggests doing this: class PagesControllerTest < ActionController::TestCase def setup def self.url_for(options, *parameters_for_method_reference) options.merge! :only_path
2008 Dec 20
3
undefined method `stories_path'
Hi, I recieve error "undefined method `stories_path'' for #<ActionView::Base:0x995b4ac>" when going to the view via site.com/stories/new The model is setup correctly, I can retrieve data from the db fine. I think it 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
2009 Jul 13
3
undefined method error from atom builder
I have a simple controller that takes a request, looks up some data and then returns the results as either HTML or Atom. The HTML response works fine, but the Atom Builder is blowing up with an undefined method error that I can''t figure out. It seems to be failing when the ActiveRecord instance is passed to the ''entry'' method and it tries to build the URL via the
2008 Apr 28
4
Failed upgrade to Rails 2.0.2
I tried upgrading my site from 1.2.6 to 2.0.2 and now it''s completely dead. The main stumbling block was that I use ActionWebService. After googling around I found several different solutions to getting that to work, including changes to config/environment.rb, adding search paths, and changing gems. None of those seemed to work, and now I''m at the point where nothing works at
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 belongs to ActionDispatch::Routing): (proxy || self).send(named_route, *args)
2008 Sep 04
1
can't find RMagick on Windows?
I followed the RMagick installation instructions for Windows and everything appeared to go fine. I added the require ''rubygems'' require ''RMagick'' lines to my controller. I get a MissingSourceFile error, with the msg : no such file to load -- RMagick I''m using InstantRails2.0, which uses Rails 2.0.2 and Ruby 1.8.6. I''m pretty new to Ruby and
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
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
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)
2008 Dec 14
0
ActionController::TestRequest bug?
Hi, while starting to setup functional tests for my application I received the following error: NoMethodError: undefined method `server_name'' for #<ActionController::TestRequest which is coming from an instance variable I''m setting up in my application controller. @domain = Domain.find_or_create_by_name(request.server_name) I''m using rails 2.0.2, any guidance
2007 Jul 24
0
re-writing a jscript in Ruby
Hi, does anyone have experience in this subject? I might have to re- write a jscript running on a windows platform to something that can run under linux. I was thinking of using Ruby but I''m not sure if its the right tool for the job. Any thoughts? ideas? the script will have to read information passed from something like Oblix or a cookie.