Rails is our web framework. Goals Be able to write a simple Rails application. Understand how Rails talks to the...
CSS support in major e-mail clients is horrible. This will give you an overview what you will not be...
Small web application where you can upload an image (PNG, JPEG, GIF) and generate a base64-encoded version of it...
Note: Making a reverse proxy with nginx is much more straightforward. A reverse proxy is a "man in the middle...
Capistrano 3 is a major rework of the framework and requires several adjustments to your deploy configuration files. The biggest...
Starting from Rails 4.0, you can use a special form options helper called #collection_check_boxes. It behaves similar to...
Awesome hack by Tim VanFosson:
See this Railscast. Basically you can simply write views like index.xlsx.erb: ID Name Release Date Price <% @products.each do |product| %> <%= product.id...
jQuery doesn't store information about event listeners and data values with the element itself. This information is instead stored...
Here is a Javascript function reloadUsers() that fetches a HTML snippet from the server using AJAX and replaces the current...
This jasmine plugin helps with testing DOM manipulation in two ways: It gives you DOM-related matchers like toBeVisible() or...
Capybara-screenshot can automatically save screenshots and the HTML for failed Capybara tests in Cucumber, RSpec or Minitest. Requires Capybara...
In the Controller: // Instead of doing this: app.controller('TodoCtrl', function ($scope) { $scope.input = 'ex. buy milk'; }); // Do this: app.controller('TodoCtrl', function...
Clamps (ie. cuts off) an HTML element's content by adding ellipsis to it if the content inside is too...
Using this gem I could get JSON generation from a large, nested Ruby hash down from 200ms to 2ms.
To bind an HTML value to ng-bind-html, you need to mark it as "trusted" first. Among other ways...
In Thunderbird, you can set custom font faces and sizes for reading plain-text e-mails. However, Thunderbird sometimes "randomly...
If you're using the :header_html option in PDFKit (or the corresponding --header-html option in wkhtmltopdf), and the...
Capybara and most assistive technology will fail to find tags that are missing an href attribute. This will probably happen...
In Rails, you can very easily send emails with HTML and plaintext bodies. However, if you're trying to debug...
PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...
Styling HTML email is painful. Tables, inline CSS, unsupported CSS, desktop clients, web clients, mobile clients, various devices, various providers...
Nearly all jQuery traversal functions ignore elements that are not HTML tags. To work with other type of nodes (like...
Code snippet tested with Rails 2.3 def index # ... if request.xhr? html = render_to_string(:partial => "list", :layout => false) respond_to...