Displaying 20 results from an estimated 10000 matches similar to: "Can I add a singleton action to @controller in a test?"
2008 May 29
2
Render partial yields "dynamic constant assignment"
I''m getting a syntax error when rendering a partial. This is a simple
html partial with one instance variable inside it. Rendering as a
"template" instead of as a partial works just fine. The error occurs 3
lines after the last line of HTML code in the partial. There is no line
72! Here is the error:
SyntaxError in Building_blocks#preview
Showing
2008 May 07
2
Question on authenticity tokens
Does anyone find them useful? I can see them being good in some cases,
but I have many exceptions that occur because of expired sessions. I am
also not sure if they are really required for pages that require a login
to access.
The other place that they cause issues is in javascript requests. I am
not using the built-in helpers, and all the javascript exists in
separate js files. There is ways
2006 Oct 16
4
Singleton Pattern in RoR
Hi all
how can I implement the singleton patter in RoR?
thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this
2006 May 22
2
using Singleton with Prototype
Hello all. I''m writing my own object using prototype and I
wonder how you write and call only one instance of class. Can
anyone share his idea of singleton?
thanks
Gregor
----------------------------------------------------
Gdy nadchodzi przełomowy moment w historii, musisz zdecydować,
po czyjej stronie będziesz.
"X-Men: Ostatni bastion" - w kinach od 26 maja.
2009 Oct 08
4
[LLVMdev] Is ExecutionEngine always meant to be a singleton?
Right now, on X86, creating multiple ExecutionEngines in the same
process causes an assertion.
If it's supposed to always be a singleton, should there be a way to
get the process's ExecutionEngine instance?
This would, among other things, allow "lli" to execute bitcode that
itself uses the ExecutionEngine.
2012 Mar 16
2
Singleton pattern
Hi all,
I know it may not have much sense thinking about a Singleton Pattern in an
R application which doesn't use any OOP facilities, however I'm curious to
know if anybody faced the same issue. I've been googling but using
"singleton pattern" as a key word leads to typical OOP languages like Java
or C++ among others.
So my problem is that I'd like to ensure some very
2009 Oct 09
0
[LLVMdev] Is ExecutionEngine always meant to be a singleton?
On Oct 8, 2009, at 9:19 AM, Kenneth Uildriks wrote:
> Right now, on X86, creating multiple ExecutionEngines in the same
> process causes an assertion.
>
Yes. This is by design.
> If it's supposed to always be a singleton, should there be a way to
> get the process's ExecutionEngine instance?
>
I can't see why. You could make a server to process llvm code.
>
2006 Aug 23
5
Singleton-like Worker
Hello there,
I need a Worker Class to be Singleton-like, that means there must be at
maximum one Instance at a time. When a new Request is made to create another
worker of this type, it should return and wait for the other instance to be
destroyed.
what i need to do: i have a worker who needs to do sth with java and
openoffice, and it seems when i have more tha one worker simultaneously,
2008 May 12
1
'Stack level too deep' error
Hi,
Sometimes I am getting "Stack level too deep" exception. I have know no
idea on when I am getting and why I am getting.
Please give your suggestions.
Thanks in advance...
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
2007 Mar 13
1
Opening the singleton class of mocked objects
I wrote a plugin [1] a while ago that lets me do validations on a
single AR instance. Instead of defining validations in an AR class, I
can define them on a AR instance''s singleton class:
class << @video
validates_presence_of :title
end
One of my specs mocks Video.find, and the above code is run on the
mock object. When I run the spec, I get the expected
undefined method
2008 Oct 05
5
asterisk, phpagi and singleton
Hello,
I've this situation: 300+ simultaneous calls and dialplan like this:
exten => _X.,1,Answer()
exten => _X.,2,DEADAGI(check_status.php)
exten => _X.,3,Dial(SIP/other/${NUMBER})
exten => _X.,4,Hangup
exten => h,1,DEADAGI(cdr.php)
When project is running , I had a lot of defunct php scripts (I've exceed
mysql connection limits and so on, deadagi help a bit). The
2013 Sep 17
0
[LLVMdev] [RFC] Internal command line options should not be statically initialized.
Hey Andy
> One easy pattern to follow is to register the option during pass initialization with all the convenient flags and parameters, but refer to a globally defined option storage that enforces the singleton and provides visibility. As long as pass initialization happens before parseCommandLine, usage should be consistent.
>
> Strawman:
>
> cl::optval<bool> MyOption; //
2010 Feb 04
2
[LLVMdev] Jit singleton
Hi everyone !
If I call ExecutionEngine::createJIT (or EngineBuilder::create) more than
one time, the second time fails on a assertion "Multiple JIT resolvers?".
It seems that the JIT is designed to be a singleton in the process, and I
was wondering if it was something mandatory.
How hard will it be to make it a non-singleton object ? Is this a JIT-only
problem (work needed on JIT
2008 Dec 05
3
"singleton can't be dumped," but not using singleton
An action handler (select_person_by_name) in my controller class assigns
into session, and then does a redirect_to. I get the error "TypeError
(singleton can''t be dumped):" followed by a stack trace that doesn''t
cross my code.
Google tells me this is ordinarily caused by assigning a singleton
instance into session, but what I''m assigning is an ordinary String.
2010 Feb 07
3
[LLVMdev] Jit singleton
Hi Jeffrey,
Thanks for pointing me in the right direction !
I'm not using the JIT in lazy mode, but it was fun to understand the
lazy-stub code.
Attached you will find a patch which follow your 1st option : a map
Stub_address -> JITResolver instance, except that the used map is a
"std::map" to apply the same upper_bound trick as in the map
CallSiteToFunctionMap of the
2010 Feb 04
0
[LLVMdev] Jit singleton
In eager compilation mode, I don't know of anything that would go
wrong with having multiple JITs in the process. However, in lazy
compilation mode, we need to map stub addresses to the JIT that knows
how to compile them. Right now, that's done by looking up the static
"TheJITResolver" variable and assuming it's the only JIT, but we could
1) use a static
2010 Feb 10
0
[LLVMdev] Jit singleton
Thanks for the patch! I'll clean this up, convert your sample to a
unit test, and commit it for 2.7.
On Sun, Feb 7, 2010 at 6:09 AM, Olivier Meurant
<meurant.olivier at gmail.com> wrote:
> Hi Jeffrey,
>
> Thanks for pointing me in the right direction !
> I'm not using the JIT in lazy mode, but it was fun to understand the
> lazy-stub code.
>
> Attached you will
2010 Feb 10
1
[LLVMdev] Jit singleton
Thanks Jeffrey !
If possible, keep me inform (on revision number), I'm interested to see how
you will do the unit test. (For my future patch... :) ).
Thanks again.
Olivier.
On Wed, Feb 10, 2010 at 6:22 PM, Jeffrey Yasskin <jyasskin at google.com>wrote:
> Thanks for the patch! I'll clean this up, convert your sample to a
> unit test, and commit it for 2.7.
>
> On Sun,
2007 Aug 21
7
mocking singletons
How can I safely mock a singleton without the mocked method living on
outside the scope of the test method?
I''ve run into this problem with mocking methods on globals (gasp!) in
the past by doing something like
def mock_my_global
original = $my_global
$my_global.expects(:foo).returns(''bar'')
yield
$my_global = original
end
Is there something similar I
2006 Jul 03
6
Req: Workers as singletons
Hi,
it would be nice to be able to specify workers as singletons. By this
I mean that every call to the new_worker method returns the same
instance of said worker. This can be done transparently either by
adding a new argument to new_worker (something like :singleton =>
true) or adding a new method, like I did in my installation of
BackgrounDrb:
def get_worker_by_class(klass)