Params are tricky Testing for request params is a little tricky because Rails hides details about how HTTP works. In particular GET requests encode their params in the URL...
...load the dump successfully, i.e. restore data for all the tables it contained (including Rails' schema_migrations). However, it would not remove any extra tables that were not part of...
When a user shares your content, a snippet with title, image, link and description appears in her timeline. By default...
...app/models/test.rb index eg3c1k1..843c0a2 31143 --- app/models/test.rb +++ app/models/test.rb @@ -19,6 +19,10 @@ module RoutingFilter path = Rails.root / 'app' + if true + + end + return path (1/1) Discard this hunk from worktree [y,n,q...
Pour color on your Rails console with awesome_print. Turn confusing long strings into formatted output. Have objects and classes laid out clearly whenever you need it. Put gem 'awesome...
...print', :group => :development into your Gemfile. Now on the Rails console you have the command ap that will give you a colored, formatted output of whatever you pass it. See...
...your application perform with lots of data? Generate many records per table. Watch the Rails logs and query_diet to find areas of improvement. Reduce N+1 queries, preload associations...
...will see less noise in your test output: if RSpec.configuration.files_to_run.count > 5 require "simplecov" SimpleCov.start 'rails' end See also How to use Simplecov to find untested code in a Rails project...
Generating a project README Finally: Support for modelling associations between models in your application model! Example: # lib/katapult/application_model.rb
quiet_assets helps with disabling asset pipeline log messages in the development log. When the gem is added, asset pipeline...
class Errormaster CoffeeIsOut = Class.new(StandardError) # is prettier than class CoffeeIsOut < StandardError; end end Reference such an error class with Errormaster...
We are changing our name from Hoptoad to Airbrake. You see, some folks much larger than us reached out and...
Now allows to list transition paths from and to arbitrary states.
How to write to the db 27,000 times in 24 seconds instead of 9 minutes.
Sometimes, you just need to shoot from the hip…or deploy your local changes without committing them. Put this snippet...
When rendering a partial with the :collection option, you are automatically provided with a counter variable inside the partial template...
Terminus is a Capybara driver where most of the driver functions are implemented in client-side JavaScript. It lets you...
You can now add an :inverse_of option to has_one, has_many and belongs_to associations.... Without :inverse_of...
Capistrano task for Bundler.
Try our Apify gem which solves many problems you will be having.
Cerberus is a lightweight and easy-to-use Continuous Builder software for Ruby. It could be run periodically from a...
Consent is an access control abstraction layer for ActionController. It lets you restrict access to actions across your application using...
LaterDude is a small calendar helper with i18n support
A while back, I had a requirement to persist a record of which email addresses were sent an email through...
Squirrel is an enhancement for ActiveRecord’s find method that allows programmers to query the database using a more Rubyish...