similar to: How to DRY REST admin path in URLs?

Displaying 20 results from an estimated 2000 matches similar to: "How to DRY REST admin path in URLs?"

2008 Feb 28
2
REST nested routes with has_one
Hi everyone, I have 2 models: class User < ActiveRecord::Base has_one :laboratory, :foreign_key => "pi_id" end class Laboratory < ActiveRecord::Base belongs_to :pi, :class_name => "User", :foreign_key => "pi_id" end I set the following routes (in routes.rb): map.resources :laboratories map.resources :users, :has_one => :laboratory All the
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
2008 Jan 29
4
map.resources for controllers in a module
Hello- I''m giving RESTful development a shot. I''m running into some difficulty with controller I have grouped into modules. Specifically, I have a "admin" module with a "user" controller (created with "generate controller admin/user"). I managed to get map.resources wired up with this code: map.resources Admin::User, :path_prefix =>
2008 Jan 21
7
undefined method error
Hello everyone, I am following the Practical Rails: Social Networking sites book. In chapter 7 photo gallery I am getting a NoMethodError in Pages#show Showing layouts/_menu.rhtml where line #12 raised: undefined method `new_entry_path'' for #<ActionView::Base:0x52fa56c> Extracted source (around line #12): 9: <% if is_logged_in? %> 10:
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
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
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
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
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
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
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
2009 Dec 29
2
[LLVMdev] Fwd: Linking fails when compiling files that use llvm routines
Hi, I 've built llvm 2.6 in linux, and then i installed it in the system by 'make install'. However, when i try to compile a file that uses llvm routines and libraries (by giving the command: "{compiler} `llvm-config --cxxflags --ldflags --libs all -o Test test.cpp" where i tried both llvm-g++ and g++ in the {compiler} field), the linking fails and an "undefined
2010 Sep 14
1
smbclient sending no frames outside local VLAN
[I don't know whether this is the appropriate list, if not please let me know to whom to write. I submitted this as a CUPS bug and they replied by asking me to contact the "Samba folks"? I guess that is you] Hi, I'm using a MacBook Pro with MacOS X 10.6.4 and am trying to print on my company's printer accessible via samba. Whenever I try to access the print server via
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
2002 Aug 30
4
(PR#1964) The attached function working fine with R 1.3.0 but giving problem with R 1.5.1 (PR#1964)
The division part of the following code is not executing - (seq(n-1)*mean(XS)-cumsum(XS[seq(n-1)]))*diff(XS)/((n-1)*var(XS)) Note: Prof Yatracos: Would you please send them one example ? Thanks, Kaushik -----Original Message----- From: ripley@stats.ox.ac.uk [mailto:ripley@stats.ox.ac.uk] Sent: Friday, August 30, 2002 4:27 PM To: Kaushik Bhattacharyya Cc: r-devel@stat.math.ethz.ch;
2009 Dec 30
0
[LLVMdev] Fwd: Linking fails when compiling files that use llvm routines
Hi Yannis, It looks like you're missing a second back-quote before the -o. Is that exactly what you've been typing? Have you tried typing llvm-config by itself to see what is supposed to link in? --Sam ----- Original Message ---- > From: Yannis Mantzouratos <giannismantz at gmail.com> > To: llvmdev at cs.uiuc.edu > Sent: Tue, December 29, 2009 1:31:59 PM > Subject:
2018 Jul 30
3
Issues booting centos7 [dracut is failing to enable centos/root, centos/swap LVs]
> > But, what happens if you let the kernel post install scripts do the work > or setting up the initrd things? Initially, I just rebooted from LiveCD and left Grub,kernel and dracut do their job with the defaults, but unfortunately, boot process stops at initrd (dracut) stage with the following error: [ 197.768159] localhost.localdomain dracut-initqueue[252]: Warning: Could > not
2010 Jan 02
1
[LLVMdev] Adding a new instruction?
Hi, We 're working on an llvm interpreter. We perform some static analysis to detect some blocks with a specific property, and we need the interpreter to be able to recognise these blocks fast in time it reaches them. We thought of adding a new instruction in the LLVM instruction set and put it in the beginning of such blocks, so that the interpreter would be instantly alerted that the
2000 Jan 14
1
File size limit
Hello, I am using Samba 2.0.5a on a RedHat 6.1 system. I would like the smbd daemon to behave like this: When the user maps his home directory to a drive letter using Windows Explorer, he should be able to write as much to his home dir as he wants (no quota limit) but he should be able to read or transfer to his local PC drive only files whose size is less than 200KB, for example. Is there a way