I am trying to test a controller method with the following code:
it "should set an approved_at date and email the campaign's client" do
@campaign = Campaign.create(valid_attributes)
post :approve, id: @campaign.id.to_s
@campaign.reload
@campaign.approved_at.should_not be(nil)
end
However, when I run this test, I get the following error:
Failure/Error: @campaign.reload
ActiveRecord::RecordNotFound:
Couldn't find Campaign without an ID
When I run the analagous lines in the rails console, the reload works and the value is set as I need it to be. Why isn't reload working for me when I run the code in an rspec test?
Hi,
can any one please send me the project(in android) where there is only client program which can connect to server and read the response from the server.send to my mail id [email protected]
Thanks and Regards,
Pushpa
Hi.
I have made android app. my client ask me that change default language at soft keyboard case by case. one case, keyboard should be English keyboard, another, Korean keyboard.
how can i do?
thx.
The WSDL generated by WCF is describing all my bindings, and I want it to describe only the wsHttpBinding.
I want it because a PHP client can't parse the WSDL if it contains unknown bindings.
There is a way to do that?
I was wondering if somebody use syslog to log his web application errors/warning/info ? It could be quite useful in a deployment environment with a lot of servers.
If yes, what kind of client visualisation you can get to watch errors and grouping the same errors into batch?
Do you use other techniques than syslog to achieve this kind of logging functionality?
I developed a flex ria application.The client cannot able to run the program if he/she copy the installation files from the original system to some other system.How can i do that??
And how can i create a trial version of the application?
I wander how do client side get response if the connection of request is not finished yet?
What's the principle?
In fact I've read quite a few posts on this subject:
http://stackoverflow.com/questions/333664/simple-long-polling-example-code
http://stackoverflow.com/questions/932415/how-does-the-live-real-time-typing-work-in-google-wave
But none of them solve my doubt
I am creating a web site and my client demands to restrict user to copy TEXT displayed on the web page.how can I do that? I am using PHP and HTML in my application.
Imagine a repository with many kind of files.
Then, I want to get from this repository just some kind of files in a "filter process".
I mean ALL FILES are versioned. But to my local work, I just wanna i.e get *.php files, ignoring download *.jpg instead.
I think about client-site hook script (pre-update).
Anyone know if is it possible?
Thanks!
I have several separate SVN repositories locally on my machine and I use only the TortoiseSVN client functionality without an SVN server backend.
Now I want to merge these repositories while keeping the revision history of individual files. Is that possible with with TortoiseSVN alone or even SVN?
I'd like to dynamically be able to host client's domains, with just having to provide them instructions like this: http://www.tumblr.com/docs/en/custom_domains
I'm running a pretty typical LAMP stack; any good tutorials for configuring this on both the Apache and PHP side?
How can I implement following logic?
User registers with an e-mail address
If provided e-mail address is a valid
email address Then user account get's
activated
or if it is a fake email then user
account is not activated
I doubt that I can catch the - "Delivery failed reply message", right?
anyhow how would you suggest to implement the above logic?
PS. I will have to find a way no matter what, client wants it =)
hi
I have created an application in VStudio. It ran nicely in debugging mode, but my computer became slower and slower as I worked until it finaly became frozen.
after I manualy restarted it, the app wasn't running any more in debug and I get this execption in the browser.
Only I am connected right now to the app.
I have restarted the computer so there coudn't be any instance of a client connected
I have removed and reinstalled the IIS
what is wrong?
I have a website in which I have a several php forms that I would like to fill out with auto generated content (for the purposes of exercising different content the user could submit). I would like to write a client side application that enables me to do so.
Is there any way either using webtoolkit, java script etc of doing this?
Thank all for your help,
PHPNoob
In the case of an IM client. I have made 2 separate threads to handle sending packets (by std io) and receiving packets. The question is how to make these 2 threads run simultaneously so that I can keep prompting for input while at the same time be ready to receive packets at any time?
I have already tried setting a timer but the data is always lost receiving.
Hi
i tried to implement a servlet with servlet (in tomcat 6) which act as as a proxy (for browser), it takes the parsed url, use apache httpclient to get the result & push it back to the client (browser), with http it works well, doesnt work with https , seems the problem concerns unsupported CONNECT method in servlet-api & servlet even doesn't see the request
is there any solution/workaround for this?
thanx in advanced
I'm writing an emulator for a game and one of the functions is "SendToAll".
How can I check which sockets are still connected?
(The client doesn't send a Logout/Disconnect packet.)
Hey,
I wanted to know if we can access the HttpContext class in the App_Code folder. I am asking so because i have a CommonMethods.cs class inside my App_Code folder.
I have written a method that checks if a cookie exists on the client machine or not, but it does not return the cookie.
Although when i write the same code on the ASPX.cs page i get the cookie!!
can anybody clarify me as in whats going on??
thanks
I am trying to cancel a task awaiting for network IO using CancellationTokenSource, but I have to wait until TcpClient connects:
try
{
while (true)
{
token.Token.ThrowIfCancellationRequested();
Thread.Sleep(int.MaxValue); //simulating a TcpListener waiting for request
}
}
any ideas ?
Secondly, is it OK to start each client in a separate task ?
Simple question, don't have a printer around, My client is asking if the hiddent elements of the web page(items that show up on click) will be printed out on the paper or will it be hidden?
Hi,
I'm a .NET programmer who've just started to learn more about client side scripting, and I was wondering sometimes you use $get('value') and $find('value') and I've discovered that these are just shortcuts for document.getElementById('value') and Sys.Application.findComponent('value'), respectively.
However, I still don't understand: what is the difference between these two functions in JavaScript? What exactly are they looking up/retrieving when invoked?
Thanks in advance.
I have a web service hosted on a web server, I invoke the web service using jquery ajax.
The service returns results successfully when invoked locally from the server, but it fails when invoked from a remote client machine (not in the same domain).
I see the request fail in the firebug returning error (401 UnAuthorized) and the response has the following error (Request format is unrecognized for URL unexpectedly ending in '/List').
Hello. At my domains for audit purposes I've got UpdatedOn property.
Now I set it at client before updating to DateTime.Now. But a lot of users have incorrect datetime at theirs machines, so i need use server datetime (getdate(),now()...)
How can i implement this strategy?
I write an application in Java. I get form a database a table (clients) which contains fields like:
name | surname | adress
What is the best solution to store this data in my app? Should I create an object for each client and store these objects in a list or set?
The table contains about 100 records and it's already sorted.
Thanks in advance.