RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: bertomartin
Guys, you may wanna check out this fix for the CSRF issues: http://stackoverflow.com/questions/10351386/rails-doorkeeper-cant-verify-csrf-token-authenticity?rq=1
use http caching: http://railscasts.com/episodes/321-http-caching
or page caching.
I'm interested in #3, model caching + fragment caching. Why would you need to use both? I just saw the model caching video, and it looks like it solves almost all the caching problems to me, tradeoff being more memory for memcache. Can you give me an example of how you're using both model/fragment caching?
is cache_digests more efficient?
ugh? this also generates a key for the models nuh?
What do you suggest he builds? I think the point is to just show the basics of working with the technology. I'm happy with samey.
You only need to do the secure cookie thing if you don't want to process all request over https
+1 for HttpOnly
What I'd like to see is mixing ember with some server side rendering...just to see how I could incorporate this into an existing application.
I don't think the number of screencast matter in this case. I think ember was very clearly presented in this one. Can't wait to see persistence in the next.
Do you mind elaborating on which task you find Angular is better at than JQuery? I'm trying to figure out whether to use Angular or even Ember for some stuff, but I'm not sure how to integrate these into an app that's already built on rails. I find it much easier to use JQuery along with Handlebars for templating in such cases.
Yep, using activerecord/sql-db will definitely be an issue. I wonder whether Ryan is planning on doing a "from scratch" implementation using redis. I will check out your gem.
Nice episode! Will definitely check out Angular. I was focused on getting up to speed with ember, but this looks great too.
+1. I always do auth from scratch. It's just too personal to your app to 'outsource'.
Remember that you're sending back a "js.erb" view template. This just renders out the _task or form. So if you already had error message handling, it will just work. Try it!
+1 Very efficient. I hope Ryan can update the log to include this. This comment is very useful, and prolly missed by a lot of people.
Nice. I recently did something like this, but I used the friendly_id gem instead for the friendly url stuff. Nice info nonetheless.
+1. nice alternative. Still prefer the endless scrolling feature for image heavy sites. So much easier to handle.
Static footers...if you really want it.
Some people use pop-ups rather than going to another page. That seems to work fine. But if you really need to go to another page, then I'm not sure. I'll try this tonight.
Thanks for that! I was wondering why they weren't update more often.
Hey, thanks for the comment. I've been playing around with chef using the hosted version. I realized that some of the opscode cookbooks are a bit outdated, so I've turned to github to find cookbooks. My problem now is how to mix these cookbooks with the ones I've already downloaded using knife cookbook install site install... I think Librarian should help, but I'm lost after you mentioned bundler. What does bundler have to do with chef?
How'd you do that if you're using something like Vagrant (a virtual machine for development).
Thanks for the clarification.
Thanks for this information. Will be taking a closer look at this.
Awesome Ryan! Great job. I have one question. Let's say your client app is a mobile app (such as an android app), would you have to redirect to a browser (out of the app) when trying to login? The json part is ok as both android and ios have libraries for those.
+100 on this episode.
Have anyone tried using grape? It's built directly on top of Rack, which would seem to make it quite efficient. I think it also has an interface for oauth authentication.
Make a generic api controller and inherit from that. Then override whatever you need to in the subclasses.
Interesting. However, the date part of the hash will probably leave you open for re-play attacks.
Good one. Under what circumstances would you recommend this over elastic search? The obvious benefit is that you don't need to install and keep up another piece of software just for indexing your content, but I'm concerned about the speed. Have anyone done a speed test between these two search systems? For example, could this handle searching data for a site like pinterest? To think of it, one could start using this and add elastic search later...but any suggestions? Thanks-
Figured out a way from your recent post on Capistrano using Multistage-extension. thnx for that one.
Great job Ryan. Question: what if you're deploying to a test server first, then up to production? like so: Dev --> Test <--> Prod. The arrow goes both ways between test and prod because the prod database is sent to testing db and the testing code sent to prod server for releases.
Pushing from dev -> test is fine. But how about copying the code from test to prod? I don't want to ever push code from dev --> prod because multiple developers are working on the project and they're all at different points in the code.
I could simply scp the code over, but is there a more efficient way? Thanks all.
How can I add my own icon sprite? I see we're setting the variable here:
However, where in my project would I put my "icon-sprite.png" file. There's no twitter/bootstrap folder anywhere.
Good to know. Thanks
Thanks for the reply. I was thinking more to override things I didn't like by looking at the source. I code in plain css.
I didn't really understand why I shouldn't just download the .zip package and add everything myself (to the css and js directories and application.css/js). Why is that such a bad thing?
I've used Foundation and I'm planning to switch to bootstrap.I'm new to Bootstrap, but I can see that it is more feature rich (for example, the dropdown menu on small screens, more buttons styles, nicer popup style). As well, bootstrap seems more integrated. I'm switching mainly because of the fluid layout options. Foundation is good, but I think the responsive menu that bootstrap gives you out of the box is a great feature. I'm still planning to keep some styles from zurb's foundation though. No problem in mixing styles.
Thanks for that information regarding devise. I was also wondering why would I want to use it. Though, I'm sure that password resets and account verification wouldn't be that hard to accomplish with this episode as a starting point.
Excellent. Very clear. Does one really get a great performance gain by just using rack with a bunch of middleware for a simple app? Also, I'm thinking this is just instructive, as sinatra seems to cover most everything with minimal overhead already. Thanks again.
This definitely clarified some questions I have about the differences between activemerchant, spree and some other systems. It seems that with active merchant you'll need to build out your order<->line item<-->products model. I think this is more suited for adding a /shop section on a blog or site that doesn't have ecommerce as a priority. Of course, this could be used to build fully fledge e-commerce solution, but why would one use this over spree?
I'm thinking about using this technique to create a pop up for login. But not too sure how to procede (haven't tried yet, just thinking). I do know I need to send json from session#new function and use js to consume that and add it to the hidden lightbox. That's how I'm thinking about it, can anyone let me know if this sounds right...I'd like to use gon and possibly rabl too. Help appreciated.