Controlling how your website appears on social media feeds
Social network previews often pick the wrong title, image and description unless OpenGraph meta tags provide them; Facebook caches previews and may need manual refresh.
Building web applications: Beyond the happy path
Web apps fail on devices, browsers, slow networks, large data, and printing when responsive design, loading states, image handling, and metadata are neglected.
How to query GraphQL APIs with Ruby
GraphQL APIs return nested data through one endpoint, and Ruby can query or mutate them with plain HTTP requests without adding graphql-client.
Disable SimpleCov if you only run a fraction of your tests
Coverage reports add noise when only a small subset of tests runs; skipping SimpleCov for partial runs keeps output cleaner.
Katapult 0.4.0 released
Katapult 0.4.0 adds application-model associations and can generate a project README for Rails-style project scaffolding.
Mute Rails asset pipeline log messages
quiet_assets suppresses noisy asset pipeline messages in development logs, reducing clutter while keeping them available when needed.
Defining custom errors in Ruby
Custom exception classes in Ruby can be defined with Class.new(StandardError) and referenced as namespaced constants.
Hoptoad is now Airbrake
Hoptoad has been renamed to Airbrake after a trademark dispute over frog- and toad-related names.
state_machine 0.10.0 was released
Now allows to list transition paths from and to arbitrary states.
ActiveRecord Table Transform
How to write to the db 27,000 times in 24 seconds instead of 9 minutes.
Capistrano cowboy deploys
Sometimes, you just need to shoot from the hip…or deploy your local changes without committing them. Put this snippet from Jesse Newland in ~/.caprc and now you can cap cowboy deploy.
Counters for Partials
When rendering a partial with the :collection option, you are automatically provided with a counter variable inside the partial template.
Terminus: a client-side Capybara driver
Terminus is a Capybara driver where most of the driver functions are implemented in client-side JavaScript. It lets you script any browser on any machine using the Capybara API, without any browser plugins or extensions.
Undocumented :inverse_of option for ActiveRecord associations
You can now add an :inverse_of option to has_one, has_many and belongs_to associations.... Without :inverse_of m and f.man would be different instances of the same object (f.man being pulled from the database again). With these new :inverse_of options m and f.man are the same in memory instance.
lib/bundler/capistrano.rb at master from carlhuda's bundler - GitHub
Capistrano task for Bundler.
Build a JSON API for a Rails application
Try our Apify gem which solves many problems you will be having.
Cerberus: Home
Cerberus is a lightweight and easy-to-use Continuous Builder software for Ruby. It could be run periodically from a scheduler and check if application tests are broken. In case of failed tests Cerberus sends notification to developers.
jcoglan's consent at master — GitHub
Consent is an access control abstraction layer for ActionController. It lets you restrict access to actions across your application using a single config file, rather than scattering access logic across your controllers using verify() and method-specific logic.
clemens's later_dude at master - GitHub
LaterDude is a small calendar helper with i18n support
Agile Ajax » ActionMailer Callbacks: In the Spirit of ActionController Filters » Pathfinder Development
A while back, I had a requirement to persist a record of which email addresses were sent an email through the system. I expected to find callback support for ActionMailer, but was surprised to find that it didn't exist.
Squirrel
Squirrel is an enhancement for ActiveRecord’s find method that allows programmers to query the database using a more Rubyish syntax.
bundle-fu - Google Code
Web 2.0 sites have lots of tiny javascript/css files, which causes one extra round trip per file to the server and back! This is bad! Bundle-fu throws it all up into a big package and sends it out all at once.
jcapote's theman at master - GitHub
theman is a super simple "framework" that uses god/rufus-scheduler to create long running workers that do things at certain times.