Modern browsers natively suppport file pickers that allow the user to choose multiple files at once. To activate this feature...
class Document < ActiveRecord::Base scope :any_tags, -> (tags){ where('tags && ARRAY[?]', tags) } scope :all_tags, -> (tags){ where('tags @> ARRAY...
A different take on what we're doing with ActiveType. Since it lives under the rails organization it might be...
To avoid n+1 queries, you want to eager-load associated records if you know you need to access them...
Cookies without an expiration timestamp are called "session cookies". [1] They should only be kept until the end of the...
So you want to organize your I18n using multiple .yml files but your Rails 4.1 application simply won't use...
There are different ways to run rake: On Rails 4.1+ projects, you have Spring and its binstubs which dramatically improve...
In Rails, you can very easily send emails with HTML and plaintext bodies. However, if you're trying to debug...
We will be installing rbenv and ruby-build from our own fork, not from the Ubuntu sources. Installing rbenv
# config/initializers/sidekiq.rb # Perform Sidekiq jobs immediately in development, # so you don't have to run a separate process.
Getting rid of your old LibreOffice Remove your old LibreOffice: sudo apt-get remove libreoffice* You probably also want to...
Let's say you have two screens: Show a given project Show a report for all projects Ideally you want...
PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...
Yesterday, Rails fixed a security issue (CVE-2014-3514) in Rails 4+. It was possible to use .where...
Microsoft Exchange service administrators can enable Exchange Web Services (EWS) which is a rather accessible XML API for interacting with...
edge_rider is Power tools for ActiveRecord relations (scopes). Please note that some of the functions edge_rider provides have...
Amazing guide how to divide a ball of Javascript spaghetti distinct separate layers (model, view, controller, backend adapter).
Previously the assets group existed to avoid unintended compilation-on-demand in production. As Rails 4 doesn't behave like...
Spreewald 1.1.0 drops the be_true and be_false matchers in order to be RSpec 3 and Ruby 2 compatible...
Code snippet tested with Rails 2.3 def index # ... if request.xhr? html = render_to_string(:partial => "list", :layout => false) respond_to...
When connecting to multiple (i.e. > 4) servers to dive into logfiles or do security updates, terminator is what you want...
Automatically builds gems from Bower packages (currently 1700 gems available). Packaged Javascript files are then automatically available in your asset...
In whenever you can schedule Ruby code directly like so: every 1.day, :at => '4:30 am' do runner "MyModel.task_to...
So you're getting an error message like the following, although your Gemfile lists shoulda-matchers and it has always...