Rails 3: Detect if cookies are disabled on server side - ruby-on-rails-3

Whats the best way to do this (if possible at all)?

Take a look at this article http://clearcove.ca/2009/09/rails-cookie-detection/.
I think it got it all covered, and it has some source code too.

Related

Is there a way to programmatically share current plan with a defined user?

So far, I experimented with:
new DroneDeploy({version: 1}).then(function(dronedeploy){
dronedeploy.Plans.getCurrentlyViewed().then(function(plan){
plan.shared_users.push({username: "my.username#mail.kom"});
return plan;
).then(function(plan){
dronedeploy.Plans.update( plan.id,{shared_users: plan.shared_users});
});
);
It gives error:
shared_users is not a whitelisted field to update on the plan.
But still makes the sharing. I guess it is not the best and reliable way, what what be the proper one?
Unfortunately, the ability to edit shared_users is actually a bug that will be fixed soon. There is no official way to share through the DroneDeploy API.
If you'd like to request that as a feature, you can do so by opening an issue here: https://github.com/dronedeploy/DroneDeploy-App-Market/issues
Disclosure: I am a developer on the DroneDeploy team

Is _method=DELETE really supported?

I just noticed that my application can not remove a like on a media object. My code for liking / unliking is identical except I add the parameter _method=DELETE to the unlike case (both use POST). The documentation states that this is supported, and it's pretty common for RESTful API given the lack of support in most browsers for DELETE. I've tried in from the Apigee console too, and the same problem seems to exist, however DELETE does seen to work. I'd attach screenshot from the Apigee console, but apparently I need more points or something.
Yes, this is really supported, but it has been broken since February 3rd. It has now been fixed!

CasperJS: Disable remote page's javascript but still use casper.evaluate?

Thanks for reading my topic, I'd be really grateful if anyone could suggest any other avenues I should explore to achieve the below.
Using CasperJS or PhantomJS I need to disable all JavaScript that belongs to the pages I navigate from being executed, while still being able to run my own using casper.execute.
Does anyone know a way I can do this?
Is it possible to modify the HTTP headers or bodies using onResourceRequested or onResourceReceived? or cancel a request conditionally? or are they read only?
Can you modify the raw HTML source before it's offered for parsing?
I've tried hacking a window.stop() in a casper.execute early, but this works inconsistently between pages.
Is the Phantom WebServer module used for this kind of thing? Could/Should I route reqs/responses through that and modify them as they pass through?
Thanks for any help - I appreciate this is a weird use case.
As stated here it is possible but not with the current phantomjs master branch but in a specific [dev branch[(https://github.com/Vitallium/phantomjs/tree/allow-to-disable-js), you should build from, look for the latest commit for disable-javascript option.

how to access files in apple photostream

I was wondering if there is a way to access the files stored in Apples Photostream via code from another Application. I haven't found anything online yet concerning that topic and don't know if it's even possible.
Thanks !
Take a look at this example:
https://developer.apple.com/library/ios/#samplecode/MyImagePicker/Introduction/Intro.html
The key thing to remember is to use the ALAssetsGroupPhotoStream flag when specifying the values for enumerateGroupsWithTypes.

BWToolkit Token Header?

I've had a lot of great help from everyone on here. I've been told I need to remove the Token headers from my BWToolkit framework or it will be rejected (outlined here)
However, being new to Cocoa, i'm not sure how to do this without screwing it up. Can someone explain in dummies terms how I should go about this?
As I said in a comment earlier, you need to remove the private API offending headers. They are: NSTokenAttachment.h and NSTokenAttachmentCell.h.
Well, it looks like you want a detailed step by step process. Here we go. :)
First of all, find the BWToolkitFramework that you downloaded.
Next, open Headers
Delete these two files:
And you're done. Wasn't that hard, was it? :)
ByteProject has released a new version of the BWtoolkit without any private api.
They removed BWTokenField, which uses NSTokenAttachmentCell and this is private API3
more info here : http://byteproject.net/