I have a JS plugin (getvero.com) that creates a cookie like that
[{"command":["events_track","Visited site",{},{"time":1377020238096}],"job_id":"1377020238097_9041"},{"command":["events_track","Visited Site",{"URL":"http://mywebsite.com/discoveries/","Referrer":"Direct","_n":"Visited Site","_k":"cd4dde369919a1626d13a28d1d54bc11bdc7f48d","_p":"qLipS0SbtoTOfJCUyiyRjoCQFFo=","_t":1377020242},{"time":1377020241741}],"job_id":"1377020241741_235"},{"command":["events_track","Visit all discoveries",{"_n":"Visit all discoveries","_k":"cd4dde369919a1626d13a28d1d54bc11bdc7f48d","_p":"qLipS0SbtoTOfJCUyiyRjoCQFFo=","_t":1377020242},{"time":1377020241752}],"job_id":"1377020241752_8389"}]
which makes play answer an err_empty_response when I ask for a page without removing the cookie.
I was with play 2.0.4, I upgraded to 2.0.6 but didn't make it work.
Seems close to this issue : http://play.lighthouseapp.com/projects/57987/tickets/1618-long-cookies-with-double-quote-values-make-play-fail-before-the-request-is-handled
I'll try 2.1 later.
Otherwise, any idea ?
Upgrading to Play 2.1 made it work.
Related
I am looking for some way how to save exact cookie in Cypress through whole test case.
Was using
Cypress.Cookies.defaults({ preserve: 'cookie_name' })
and
Cypress.Cookies.preserveOnce('cookie_name')
but this doesn't work anymore. And the new cy.session() is not working for me, because I use custom addresses per user and per new form.
Does anyone know of anything that works better than cy.session()?
The use pattern of cy.session() is a bit opaque, but since it replaces the older cookie config it probably can be made to work.
I have seen a note somewhere that session is likely to be revamped shortly.
Since Cypress.Cookies.preserveOnce('cookie_name') is deprecated but still available, maybe use that until session mark 2 comes along.
Rails has 607 open issues...so, rather than plugging that hole even more I though Id try here first. I have upgraded to 4.1 and am implementing rails mailer previews. I tried upgrading my existing mailer and adding tests/mailers/previews directory. When that gave the following error I tried generating a new mailer. Same error.
class NotifierPreview < ActionMailer::Preview
def welcome
Notifier.welcome(User.first)
end
end
results in this error:
The action 'notifier' could not be found for Rails::MailersController
I've tried searching google, the docs, stack overflow, but nothing eludes to this error.
Anyone experience this or have any ideas?
The default preview path is /test/mailers/previews but rspec will override this to be /spec/mailers/previews
You can set the path to be whatever you like with:
config.action_mailer.preview_path = "#{Rails.root}/test/mailers/previews"
This is because you are using UserMailer with NotifierPreview. Change NotifierPreview to UserMailerPreview and it will start working. Check the example implementation https://github.com/RichIsOnRails/ActionMailerPreviewsExample and tutorial.
Cheers!!
If you're using rspec, make sure that the rspec-rails gem is being loaded in the development environment, otherwise Rails will look for the previews under the /test folder, not /spec.
Remove the line(s)
get '/:controller(/:action(/:id))'
get '/:controller(/:action(/:id))(.:format)'
from your routes.rb
As #hellion says in a comment on the previous answer this is the solution to this problem.
I've been trying to implement a router as specified in this guide, but I can't make it work. Can anyone give a quick code sample using the latest version of Ember to enable a router that supports routing through urls?
Here is a one with ember latest, still prone to changes :)
http://jsfiddle.net/C7LrM/86/ posted by #mediastuttgart
The comments section of this Gist by wycats looks like the place where you can get updated fiddles :) https://gist.github.com/2728699#comments
This example uses:
handlebars-1.0.0.beta.6.js
Ember latest as of now:
// Version: v0.9.8.1-484-g73ac0a4
// Last commit: 73ac0a4 (2012-07-06 11:52:32 -0700)
For documentation of present code under development please go to ember source where they have documentation alongside code,
Eg: https://github.com/emberjs/ember.js/blob/master/packages/ember-routing/lib/router.js
https://github.com/emberjs/ember.js/blob/master/packages/ember-routing/ in general
I just played with ember routing example. It looks quite interesting. Especially if you are going to build all your application on Ember framework.
But parameters in url follows after '#'. That means you can't copy and send a link to someone if client has to login with postback (if only to set a cookie with login parameters). Is there a better option - maybe use '?' instead of '#'?
You may also have a look at Ember.Router.
There are two good start points # https://gist.github.com/2679013 and https://gist.github.com/2728699
A lot of fixes have been made the last couple of days.
EDIT
A brand new guide is now available # https://emberjs-staging-new.herokuapp.com/guides/outlets#toc_the-router
Here is a full example courtesy of https://github.com/jbrown
http://jsfiddle.net/justinbrown/C7LrM/10/
I am building control that uses last version of jstree. Problem is that whole system is build using jQuery 1.3.2, but i need to use jQuery 1.4.2 for jstree, also to prevent errors need "$" still pointing to jQuery 1.3.2 to make system works normally. I tried to solve problem like this
var jq142 = jQuery.noConflict(true);
And it works, but when i added other control to form like "datepicker" that initialized via $("#id").datepicker it throws error $("#id").datepicker is not a function
When i inspect DOM variables through firebug all is ok - $ is pointing to 1.3.2 and datepicker function is registered.
What it can be?
Thanks
in case anyone came to this by looking for unanswered questions, the answer was to simply upgrade to 1.4.*
btw: jQuery 1.7 has just been released... time to upgrade again ;-)