similar to: map.resources for controllers in a module

Displaying 20 results from an estimated 900 matches similar to: "map.resources for controllers in a module"

2007 Sep 30
9
Problems with testing nested routes using mocking
Hello forum I have there to files #----- virtual_host_controller.rb class VirtualHostsController < ApplicationController before_filter :capture_domain # GET /domain/1/virtual_hosts/1 def show @virtual_host = @domain.virtual_hosts.find(params[:id]) respond_to do |format| format.html # show.rhtml end end private def capture_domain if
2008 Feb 29
3
How to DRY REST admin path in URLs?
Hi everyone... For almost all of my objects I put a series of classic REST admin links in views. For example, for a ''user'', I have <%= link_to "Show", user_path(user) %> <%= link_to "Edit", edit_user_path(user) %> <%= link_to "Destroy", user_path(user), :confirm => "Are you sure", :method => :delete %> I am tired
2012 Feb 05
4
Rspec and restful routes
Hi all, I''m trying to test that my users show page renders. The resource has the route /users/:id How would I code that for an Rspec test? So far I''ve tried these four ways: it "should have a users show path" do get user_path(:action => ''show'') end it "should have a users show path" do get user_show_path end it "should have
2002 Mar 29
2
scp : Problems with pathing
Hi, I'm sure I'll get a few "RTFM", but I hope I'll allay those feelings. I'm getting the "scp: command not found". I've read the FAQ. I've read bugs 42 and 82 in bugzilla. Hopefully, I didn't overlook something. At a minimum, defines.h has : #ifdef USER_PATH # ifdef _PATH_STDPATH # undef _PATH_STDPATH # endif # define _PATH_STDPATH
2007 Aug 08
5
Can''t seem to spec a ActiveRecord::RecordInvalid exception properly...
1 def create 2 @user = User.new(params[:user]) 3 @user.save! 4 self.current_user = @user 5 redirect_to user_path(@user) 6 flash[:notice] = "Thanks for signing up!" 7 rescue ActiveRecord::RecordInvalid 8 render :action => ''new'' 9 end I can''t seem to properly spec this out. I am trying numerous things, the latest one is
2002 Jul 08
1
PATH problem in Irix.
I recently compiled openssh 3.4p1 for SGI Irix, and found the same problem I'd had with 2.5. Viz. that Irix /usr/include/paths.h defines _PATH_USERPATH, not USER_PATH, so that defines.h doesn't find it and we get the default, which is missing /usr/bsd (which on Irix has things like head, more, lpr) and /usr/bin/X11. This annoys the users, who want X11 to work. I added a test to
2001 Feb 20
1
_PATH_STDPATH and @bindir@
Sorry if this is stuff that's been talked about before. If it is, just ignore me. I'm curious to know why Portable OpenSSH doesn't include @bindir@ in the _PATH_STDPATH. This would save most installers of portable OpenSSH from having to --with-default-path=$PREFIX/bin in order to ensure that scp will work properly. This would also, I imagine, save quite a lot of hassle for
2001 Feb 12
3
add scp path to _PATH_STDPATH
what do you think about this patch to add the path to scp to _PATH_STDPATH? is there a better or cleaner way to do this? i'm hoping to ward off 'scp doesn't work' questions for the next release. i did *not* add this to a --with-default-path path, because if a user specifies that, they should control its value completely. Index: Makefile.in
2009 Jul 30
4
attachment_fu + :path_prefix
Hello friends, I have a query like I am using a attchment_fu to store images. But the i don''t want to store to the default path let say :path_prefix => ''public/uploads'' i want a dyname path for e.g :path_prefix => ''public/#{ current_user.id}'', So just wanted to know how can i say images to the dynamic location. Regards Abhishek Shukla
2007 Sep 18
2
Making attachment_fu polymorphic
I am working on a small model mixin called attachment_kung to make attachment_fu polymorphic, so you no longer need a different table and Model class for every associated attachment (Productimage, Ad_doc, etc). All you really need is one model and table to handel all your attachments - in some cases, anyway. I have the code working, but have run into one small hitch that I can''t seem to
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:
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
2001 Feb 13
1
scp not found - OpenSSH 2.3.0p1 on slack 7
hi, let me start by saying ive tried everything i can think of with the --with-default-path configure flag. USER_PATH in config.h is correctly getting the value of this flag. i am installing to the default locations (user binaries to /usr/local/bin). ssh works fine, (after i did the LIBS=-lcrypt thing) but now, no matter what i do, i get "sh: scp: command not found" whenever i try to
2002 Jan 25
3
[Bug 82] scp: Command not found errors
http://bugzilla.mindrot.org/show_bug.cgi?id=82 djm at mindrot.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME ------- Additional Comments From djm at mindrot.org 2002-01-26 10:14
2007 Dec 14
2
Rails 2.0 map.namespace and path_prefix
Hi! I''m trying set up new routing in rails 2.0 and have 1 problem map.namespace :admin do |admin| admin.resources :permissions, :path_prefix => ''/:lang'' end i want have addres like this: http://site.com/en/admin/permissions also i tested: map.with_options :path_prefix => ''/:lang'' do |lang| lang.namespace :admin do |admin|
2006 Aug 28
1
Nested Resources failing..?
Hey I was wondering if anyone else was having problems with nested RESTful routes such as: map.resources :posts do |posts| posts.resources :comments end ?? It is not working for me, I have to declare it in the old prefix way, and it works fine... map.resource :comments, :path_prefix => ''/posts/:post_id'' Just wondering if others are having the same trouble before I do
2009 Apr 21
3
attachment_fu giving problem on production
Hello friends, I have configured attachment_f. It''s working fine on Local(development) system but giving problem on production. Basically on production the attachment_fu is not able to generate thumbnail image it saving the original size image. Below is the configuration. has_attachment :content_type => :image, :storage => :file_system, :max_size
2008 Apr 09
3
form_tag and form_for cause #protect_from_forgery errors
Hey All, I''m trying to do a simple form_for (and I also get it with form_tag) and I''m getting the following error: ActionView::TemplateError (No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store).) on line #2 of users/new.fbml.erb: 1: <h1>Welcome To Courses, Let''s Get
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested. But, I added some code to that model that I do need to test. Basically, I need to somehow fulfill the "uploaded_data" property so I can actually run my tests(otherwise they fail because of validations). The "uploaded_data" field is what would grab the multipart data from form. Here
2012 Oct 06
1
how to scope the /auth/:provider/callback , using OmniAuth for users and members
I have two separate groups of people authenticated w Devise , but in this case I cannot used the Devise embedded OmniAuth support. So i am using directly the OmniAuth gem. Initialized w : Rails.configuration.middleware.use OmniAuth::Builder do ..provider :twitter, .. end It''s running fine , but I have an issue with the callback route mapping : I tried match