similar to: calling routing during a functional test

Displaying 20 results from an estimated 2000 matches similar to: "calling routing during a functional test"

2010 Jan 31
3
Append/Prepend to a template from controller method
I want a method in app/controllers/application.rb that can prepend/append text to whatever template gets rendered. Of course I can''t call render twice w/o getting a double render error, so is this possible? I want to redirect after a delay using a meta refresh. Here''s what I''ve got: app/controllers/application_controller.rb: def redirect_after_delay (url, delay)
2007 Feb 01
3
should_redirect_to in rspec-0.8.0 / rspec_on_rails 1453
I have a spec: specify "a post with no user id should add a record" do post :edit_or_create, :user => {:login => ''joeschmoe'', :email => ''joe at shmoe.com'', :email_confirmation => ''joe at shmoe.com'', :full_name => ''Joe Schmoe''} assigns[:user].should_not_be_nil
2007 Jun 01
1
redirect_to a relative path
In a controller spec, doing something like: response.redirect_url.should == omglolsrofls_path ... fails, as so: expected "/omglolrofls", got "http://test.host/omglolrofls" (using ==) You can see that the http://test.host is prepended to the path. My controller is indeed redirecting to the omglolrofls path, and not the url. Is this expected ? Oh... and that''s an
2008 Mar 03
3
Admin and standard controllers RESTFully
Hello. I will appreciate the opinion. What is the standard way of separating admin functions from normal- user functions? before_filter in one controller? Use two controllers, i.e. ProductController and Admin/ ProductController? I want to use map.resources so RESTFul would be better. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to
2012 Feb 10
3
Schwefel Function Optimization
All, I am looking for an optimization library that does well on something as chaotic as the Schwefel function: schwefel <- function(x) sum(-x * sin(sqrt(abs(x)))) With these guys, not much luck: > optim(c(1,1), schwefel)$value [1] -7.890603 > optim(c(1,1), schwefel, method="SANN", control=list(maxit=10000))$value [1] -28.02825 > optim(c(1,1), schwefel, lower=c(-500,-500),
2012 Feb 10
3
Schwefel Function Optimization
All, I am looking for an optimization library that does well on something as chaotic as the Schwefel function: schwefel <- function(x) sum(-x * sin(sqrt(abs(x)))) With these guys, not much luck: > optim(c(1,1), schwefel)$value [1] -7.890603 > optim(c(1,1), schwefel, method="SANN", control=list(maxit=10000))$value [1] -28.02825 > optim(c(1,1), schwefel, lower=c(-500,-500),
2012 Nov 15
2
Suggestion: use `select` values if `pluck` called with no args
I suggest that if you don''t pass any args to ActiveRecord#pluck, it would use the select values. This follows along well with the way other AR::Calculations work. As an extra benefit we would be able to pluck virtual columns. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit
2009 Dec 21
2
a little bug for the function 'sprintf' (PR#14161)
Dear R-ers, I am a gratuate student from South China University of Technology. I fond the function 'sprintf' in R2.10.1 have a little bug(?): When you type in the example codes: > sprintf("%s is %f feet tall\n", "Sven", 7.1) and R returns: [1] "Sven is 7.100000 feet tall\n" this is very different from the 'sprintf' function in C/C++, for in
2005 Nov 10
4
write.table read.table with Dates
I've found several similar issues with write.table/read.table with Dates on this list, but trying to follow this advice I still get an error. First, I read in data from several files, constructing several date/time columns using ISOdatetime > str(Tall$Begin) 'POSIXct', format: chr [1:40114] "2005-10-02 00:00:00" "2005-10-02 00:00:00" ... > length(Tall$Begin)
2011 Jul 22
2
Keyboards
On my new Dell system, it's got a cardreader. More to the point, it's got an idiot menu key... *right* next to the right control key, and just where the annoying keyboard design has it cut down from the oversize space bar ASCII art <ctrl><WinDoze> <tall[ ]<tall<tall<tall <ctrl> Alt>[ tall spacebar ] alt> Win>
2006 Apr 27
4
effect.SlideDown question
Hello, I want to have my box that I''m sliding down hidden when I start and then slidedown to 100px. What is the best way to do this? I don''t see anything on the wiki about it. Thanks, <http://zend.com/zce.php?c=ZEND002524&r=212822110> Jon Whitcraft Indianapolis Motor Speedway jwhitcraft-1LwPDYEpVrH2eFz/2MeuCQ@public.gmane.org Phone: (317) 492-8623 ::
2018 Dec 04
2
[cfe-dev] RFC: Supported Optimizations attribute
On Tue, Dec 4, 2018 at 2:24 PM John McCall via cfe-dev < cfe-dev at lists.llvm.org> wrote: > On 4 Dec 2018, at 13:16, Sanjoy Das wrote: > > On Mon, Dec 3, 2018 at 11:49 PM John McCall jmccall at apple.com wrote: > > Piotr's proposal unfortunately doesn't give us a good name for the class > of optimizations that require being listed in supported_optimizations. >
2007 May 21
4
Spec''ing redirect with arbitrary parameters
I''ve got the following expectation: response.should redirect_to(:action => "new", :video_id => "1", :process_id => "2", :origin_id => "3") that fails with this error message: expected redirect to {:video_id=>"1", :process_id=>"2", :origin_id=>"3", :action=>"new"}, got redirect to
2005 Jul 06
3
Incoming 800-number over IAX - first few words are cut-off
I have an incoming 800-number over IAX from Teliax and I'm experiencing the large packet loss on connection. When a call comes in there is no ring tone and the first few words of the welcome message are cut off, regardless of the delay I set. Standard call (not 800-number) coming over IAX with the same provider works just fine only the tall free number. So it seems there are some packet loss
2006 Jun 20
4
Prototype Array bug??
function CreateTOC(){ var $aTOC = document.getElementsByClassName(''tocitem''); var $temp = ''''; if(isArray($aTOC)){ for($t in $aTOC){ $temp += ''t='' + $t + '', '' + $aTOC[$t].name + ''<BR>''; } $(''test1'').innerHTML = $temp; } } When I run this code
2008 Sep 15
2
Passing an array into controller
I am trying to pass and array from an AJAX Javascript function to a controller. The parameter is being read as a single string and not an array. The Javascript function: function sendtolist(formName){ var form = $(formName) var checked = [] checked = form.getInputs("checkbox","plans[]").findAll(function(item) { return item.checked; }).pluck("value");
2007 Mar 05
4
When to stub/when to mock (was Rails functional testing and Mocha)
Hi James, > From: James Mead <jamesmead44 at gmail.com> > Date: Mar 5, 2007 5:15 AM > Subject: Re: [mocha-developer] Rails functional testing and Mocha > To: mocha-developer at rubyforge.org > "I''d probably stub the call to find not expect it, because its a query not a command" I have a different perspective on when to use stubs and when to use mocks and
2009 Aug 04
4
regex question
Hi, I am getting stuck over an apparently simple problem in the use of regular expressions : To collect together the first letters of the words from the Perl motto, ?There is more than one way to do it? in the following form ? TIMTOWTDI. I tried the following code : ? ##### A regex problem with the Perl motto astr<-"There is more than one way to do it" b1<-grep("\\<",
2013 Nov 25
6
lustre on debian
Since in Linux we are mostly a debian shop we''d like to stick with debian for our calculation nodes if possible. So I wanted to ask the lustre 2.2 instructions for Debian are they more or less relevant to lustre 2.4/2.5 or am I going headlong into a tall brick wall. Also are newer clients backwards compatible with older server software? I am currently just setting up a demo environment
2010 Nov 08
2
Several lattice plots on one page
Dear all, I am trying (!!!) to generate pdfs that have 8 plots on one page: df = data.frame( day = c(1,2,3,4), var1 = c(1,2,3,4), var2 = c(100,200,300,4000), var3 = c(10,20,300,40000), var4 = c(100000,20000,30000,4000), var5 = c(10,20,30,40), var6 = c(0.001,0.002,0.003,0.004), var7 = c(123,223,123,412), var8 = c(213,123,234,435), all = as.factor(c(1,1,1,1)))