...is installed (locally, don't put it into your Gemfile). Run geordi commit in order to set up API access for Pivotal Tracker. Put the tracker_api Gem into your...
...with value "bar". It is actually just a String without any magic powers. In order to read a cookie's value, you need to parse the string: document.cookie.match(/hello...
...collection of records for your select2 input, you can populate it via AJAX in order to not pollute your HTML with lots of elements. All you have to do is...
That’s why it’s important to find a way to order and maintain your routes. See: Clean your Rails routes: grouping Sometimes the routes.rb grows very...
...always bypass the pre-commit hook by committing with the --no-verify option.) In order to have git fix whitespace on lines you edited before each commit, append the following...
...i want the word to break. This is only done in text nodes in order to not break url's in link-tags. up.compiler('[break-long-words]', (element) => { const wordBreaks...
...seconds. You probably want to reduce these numbers significantly in order to detect dead connections in a timely fashion, but you can do this in your application code (no need...
...immune_method_1(**$hash) immune_method_2(**$hash) immune_method_3(**$hash) puts '', 'Hash order does not matter:' inversed_hash = Hash[$hash.to_a.reverse] vulnerable_method_1(inversed_hash) vulnerable_method...
...will deny access after 5 attempts. This issue might come and go as the order of the active SSH keys in your ssh-agent changes. Quick fix Have less keys...
...monitor a connection from your machine to a specific, single host or network in order to identify which network hop between your machine and the target causes trouble. You can...
These are a couple of the problems you need to solve in order to do this: There is no good way to invalidate Cloudfront cached assets, and Cloudfront...
...note that you have to replace the playlist ID and the API key in order to make this request work): https://www.googleapis.com/youtube/v3/playlistItems?playlistId= &key= A&part=snippet&fields=nextPageToken,items...
Assets search path By default, the following directories are considered, in the given order: app/assets # for application stuff lib/assets # for stuff that does not seem to fit into app/assets...
...Firefox updates, all your Cucumber features that use Selenium break. This is annoying. In order to remedy this, version 0.5.0 of our geordi gem comes with a script that helps...
...forms using a single text_field. Multiple elements will be separated with commas. In order to change its elements, it can be assigned both an array of strings or a...
...class Party < ActiveRecord::Base has_many :invitations has_many :users, through: :invitations, include: :user, order: 'users.name' end class Invitation < ActiveRecord::Base belongs_to :party belongs_to :user after_create :send...
...will probably need to take them for a ride in a sample project in order to decide which style fits you best. A nice way to compare different MV* frameworks...
...of an application, e.g. sitemap.xml.: class FeedsController < ApplicationController layout false def rss @notes = Note.all(:order => 'created_at DESC', :limit => 50) end end Routes Connect a route to the feed in...
...storage/development/photos/1/... storage/development/photos/2/... storage/development/photos/3/... storage/development/attachments/1/... storage/development/attachments/2/... storage/test/photos/1/... storage/test/photos/2/... storage/test/attachments/1/... storage/test/attachments/2/... storage/test2/photos/1/... storage/test2/photos/2/... storage/test2/attachments/1/... storage/test2/attachments/2/... In order to implement this, make Rails.env and ENV['RAILS_TEST_NUMBER'] part of your path template...
...could use this new attribute in the query as well and do something like ordering the posts by the dates of their last comments. Post.select("posts.*, MAX(comments.created_at) AS...
...latest_comment_at").joins(:comments).group("posts.id").order("latest_comment_at DESC...
To test whether two arrays have the same elements regardless of order, RSpec 1 and 2 give you the =~ matcher: actual_array.should =~ expected_array Rspec 3
To test whether two arrays have the same elements regardless of order, you can use the =~ matcher in RSpec < 2.11: actual_array.should =~ expected_array If either side is an ActiveRecord scope...
...array or contain_exactly matchers instead of =~. Use the eq matcher only if the order of records matters...
...what host it's requesting for. This is what we want to change in order to properly "fake" the request. You can do it in different ways, here are two...
...A, B, C and should not find assets D, E, F. And sometimes the order is important: it should find A, B C with exact order...