yeah nice examples, thanks!
glad you found it useful,
thanks for pointing that out. fixed
nice, thats certainly more elegant than doing it client-side.
Yeah, writing HTML in your JS is less than ideal and should be avoided. I would push for always using javascript templates. But, sometimes you find yourself in this situation.
@realdlee nice, did not know about that method
@n1k0 thanks! have fixed. Love your library, the docs are fantastic!!
@dpashkevich yeah it does simply work, but as i was saying in my example when you have dynamic attributes I find it cleaner, personal preference.
var className = "booya";
$('body').html($('<div>', {class: className}));
or you could add anything you wanted to the reject array like in my example...
["foo", "", nil] - ["", nil]
# => ["foo"]
@sandersch I like you solution as it rejects empty strings and also nil
@mbillard yes equally elegant, thanks!
anything that supports REST endpoints and JSON format will work just fine. Even if the server-side you are working with does not support full REST, then you can just switch on the _method param that gets posted as an alternative. I personally have mostly use Backbone.js on top of a Rails stack.
parseInt("42", 10);
is correct, if you use JsLint it will point out the omission of the second param of parseInt.
Just yet another reason to parseInt.
Looks interesting, i'll give it a try
Hey im working on a prototype extension library. https://github.com/dperrymorrow/lil-p/blob/master/lil-p.js
Would you be interested in collaborating on this with me? The above String addition is really cool.
I like it! I especially like that you extended the String prototype. Otherwise it would just be another template engine.
would be great to make a bookmarklet out of that so that you can test for greyscale as you work.
@blackblist My bad, fixed thanks for reading!
right, but the point of the example i posted is that it creates the gemset if it does not exist on the users computer.
thanks for the comment
Achievements
2,116 Karma
267,054 Total ProTip Views

Forked 20

Honey Badger

Nephila Komaci

Nephila Komaci 3

Walrus

Altruist

Forked

Charity

Mongoose 3

Mongoose

Raven

no i think it would be the other way around, you would have to have your database open to the outside to let your heroku app reach it.
when i did this it was a clear db mysql add on to heroku.