Ruby QuickRef Table of Contents Language General Tips These are tips I’ve given over and over and over and over… Use 2 space indent, no tabs. Ruby on Rails 3.1 Release Notes 1 Upgrading to Rails 3.1 If you're upgrading an existing application, it's a great idea to have good test coverage before going in. You should also first upgrade to Rails 3 in case you haven't and make sure your application still runs as expected before attempting to update to Rails 3.1. Then take heed of the following changes: 1.1 Rails 3.1 requires at least Ruby 1.8.7 Creating a Typeahead Widget with AngularJS If you are starting an AngularJS project you might want to have all the components written in Angular. Although it’s certainly possible to reuse the existing jQuery plugins, throwing a bunch of jQuery inside a directive is not always the correct way to do things. My advice would be to first check if the same thing can be implemented with pure Angular in a simpler/better way. This keeps your application code clean and maintainable. This tutorial, targeted towards beginners, walks the readers through the creation of a simple TypeAhead widget with AngularJS. Overview
File: HAML_REFERENCE Haml is a markup language that’s used to cleanly and simply describe the HTML of any web document, without the use of inline code. Haml functions as a replacement for inline page templating systems such as PHP, ERB, and ASP. However, Haml avoids the need for explicitly coding HTML into the template, because it is actually an abstract description of the HTML, with some code to generate dynamic content.
Rolling with Ruby on Rails by Curt Hibbs 01/20/2005 Editor's note: Curt Hibbs and Bill Walton have updated this tutorial for Rails 1.2 in Rolling with Ruby on Rails Revisited and Rolling with Ruby on Rails Revisited, Part Two. We recommend those tutorials for all new Rails development. Recipes with Angular.js - Implementing Client-Side Routing Implementing Client-Side Routing Problem You wish to use client-side routing in conjunction with a Ruby on Rails backend. Solution Every request to the backend should initially render the complete page in order to load our Angular app. Only then will the client-side rendering take over.
Ruby on Rails - Blogueur - Guillaure Barillot Selenium is a great tool for integration testing but it has two major drawbacks : it relies on Firefox engine, so every time Firefox updates, you have to cross your finger and praise your test suite will still be usable it is f**** slow Solve those 2 problems in just a few minutes, switch to [...] When it came across image manipulation using Rails, I had to make a choice : Paperclip to handle high traffic/popular websites, and DragonFly for privates, more confidential but also more evolutive applications. Let’s start with an example : # Paperclip typical image URL /system/pictures/877/thumbnail/my_thumbnail_image_name.jpg?1352719049 # DragonFly image URL /media/BAhbB1sHOgZmIjIyMDEyLzA5LzE0LzE3XzI0XzA0XzMyMl9BdXLDqWxpZV9DSEFVVkVBVS5KUEdbCDoGcDoKdGh1bWIiCjUweDUw Paperclip resizes the image on upload, then [...] C’est assez étonnant d’avoir encore ce genre de problème de nos jours, mais Ruby (même 1.9.3), ne gère toujours pas correctement les passages de caractères accentués en majuscule.