similar to: polymorphic_path not getting generated

Displaying 20 results from an estimated 80 matches similar to: "polymorphic_path not getting generated"

2009 Dec 31
0
Savage Beast For Rails 2.3
Hello rails.. I have some difficulties when integrate savage beast forum with my rails app 2.3. I found error : uninitialized constant SavageBeast::UserInit::Monitorship and then about routes..., how to set routes in order to when access http://mysite/forums the savage beast forum can be run. Anyone has a real implementation savage-beast in a rails app.., I thinks that will very help
2010 Jul 12
1
[PATCH] ocfs2: Don't duplicate page passes i_size during CoW.
During CoW, actually all the pages after i_size contains garbage data, so don't read and duplicate them. Signed-off-by: Tao Ma <tao.ma at oracle.com> --- fs/ocfs2/refcounttree.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 1cf9cda..e082623 100644 --- a/fs/ocfs2/refcounttree.c +++
2007 Feb 07
3
Upgrade to Rails 1.2.2 : RESTful routes not working anymore
Hello, I just upgraded my app to Rails 1.2.2. My routes are : map.with_options :path_prefix => "/admin", :name_prefix => "admin_" do |m| m.resources :requests, :controller => "admin/requests", :collection => { :destroy => :delete, :search => :post } do |request| request.resources :histories, :path_prefix =>
2007 Sep 05
0
Savage Beast plugin: Question on the reply form
Hello! I have integrated the Savage Beast plugin with my site. For some reason, during the integration, the standard large black reply form that gets displayed when a user hits "Reply to topic", is *always* getting displayed at the bottom of the screen ... before the user hits "Reply to topic". The built in "cancel" link on the editbox will not remove the form, and
2010 Sep 09
17
formtastic issue
Hello, I will try to explain it step by step :-) I just created a new rails 3 app, then I created a new controller... rails generate controller admin::users I didn''t forget to add the resources in the routes.rb file like this. namespace :admin do resources :users end Now I try to use formtastic to create the form but I get erorr that my users_path doesn''t exist?
2009 Jun 11
4
Using view helpers and route helpers in a model
Hi there, I am trying to get something working and its driving me crazy. I have been looking around for solutions to getting view helpers working in models and for the most part I find this solution. Add the following in the model you want to use them in include ActionView::Helpers::UrlHelper include ActionController::UrlWriter However, when I try something like
2007 Jul 06
1
Edge, link_to and mocks
Hi All, Anyone noticed that using the newer link_to syntax in edge currently fails with mocked objects in view specs or helpers. eg. if you have something like the following in your view (or equivalent in a helper): <%= link_to @dog.name, @dog %> as opposed to the current 1.2 syntax: <%= link_to @dog.name, dog_path(@dog) %> Using a mock_model as the ''dog''
2008 Feb 18
5
uh... fixtures?
RSpec-ers: I''m aware this is quite the FAQ. I have probably asked it myself, but I just can''t Google up anything but others asking it. I grabbed the source to Beast, to use as a Rails project uninfluenced by me, or RSpec. Then I installed the CURRENT version of RSpec and rspec_on_rails, and set up a model spec on Post. Here''s the spec_helper.rb lines:
2010 Sep 11
10
Having difficulty with threaded comments, using acts_as_tree
I''ve been having problems making threaded comments for the last few days. Mainly with creating children and displaying the children. Currently, I have comments shown at the bottom of my articles show view. The top level comments work, but I do not really know how to implement a way for users to "reply" to the top level comments and take them to a form (the comment
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
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
2007 Jul 12
0
routing question
I am going to be building a project and have been considering giving a go at merb for it. I don''t necessarily need a speed increase and rails would certainly serve my needs well. However, it just looks so clean, I have to try it out. I also don''t really use (know) all the extra rails stuff much, so I really just want activerecord and an MVC pattern. Perfect! So, one of my
2010 Sep 17
25
Trying to look up comment through an ID, but failing
I am trying to allow users to reply through comments by allowing users to click a reply link next to the parent comment. It will send in a parameter to the ''new'' comment view, like so: | <%= link_to "Reply", new_comment_path(:in_reply_to => comment.id) %> The form will use the :in_reply_to parameter in order to save that id as the parent id, like so:
2006 Aug 14
1
Rest, routes, path_prefix and default params
I am trying to use routes with default params to have routes ''/mycompany/departments'' and ''/companies/1/departments'' mean the same thing (both restful routes). When I set up the files as below, I get an error of ''Couldn''t find Company without an ID'' and my log file shows the following .. Processing DepartmentsController#index (for
2009 Feb 27
0
Contextually aware controllers
Hi everyone, my CMS app is starting to get quite large. I have heaps of modules (about 15) and some of these modules are re-used within different contexts: An example is that you can add a Page to the schools website, but you can also add a page to a ''Learning Cave'' which is our online learning area for kids. While all the controller and view code is essentially the same, we
2008 Jan 21
8
Polymorphic URL helpers documentation and fixes
Yesterday I answered a question regarding polymorphic URL helpers on Core ML and noticed that the module has no documentation. I''ve documented it and rewritten unit tests using Mocha. I also optimized some of the code slightly (nothing major, though). The patch also includes two fixes by Geoff Buesing, who has done awesome work in this area in the past.
2007 Aug 25
4
REST routes :has_many , new style
I am trying to write a nested route ''new style'' map.resources :franchises, :has_many => :documents in place of the : map.resources :franchises do |franchises| franchises.resources :documents, :name_prefix => "franchise_" end but get an error : no route found to match "/franchises/1/documents" with {:method=>:get} running rake routes,
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:
2007 Oct 28
2
failing test with nested controller routes
I have googled and browsed through spec-users archives, but didn''t find anything different. I used rspec scaffold command to generate a mvc for groups, I used nested controller so I could have a separate interface for admin. the specs are the same as generated, so I won''t post the whole thing. I did put the nested routes names on the calls to the name routes: it
2007 Nov 02
5
RSpec, RESTful nested routes and :path_prefix
Dear list, In the app we are making we have a rout something like this: map.resources :projects do |projects| projects.resources :pages, :controller =>"Wiki::Pages", :path_prefix => "/projects/:project_id/ wiki", :name_prefix => "project_wiki_" end But I can''t get RSpec(I''m very new to it) to accept this. It keeps throwing errors: