Create, or edit your ~/.irbrc file to include: require 'irb/ext/eval_history' # was 'irb/ext/save-history' for versions prior to Ruby 3.3 IRB.conf[:SAVE...
config.action_controller.action_on_unpermitted_parameters enables logging or raising an exception if parameters that are not explicitly permitted are...
quiet_assets helps with disabling asset pipeline log messages in the development log. When the gem is added, asset pipeline...
Spring is a Rails application preloader. When debugging e.g. the rails gem, you'll be wondering why your raise, puts...
Programatically invoke Rails generators Require the generator, instantiate it and invoke it (because generators are Thor::Groups, you need...
docopt helps you define interface for your command-line app, and automatically generate parser for it. docopt is based on...
Rubygems can produce lots of deprecation warnings, but sometimes, you cannot fix them. To have a tidy terminal with output...
If you want to label things with a color but don't actually care which cholor, you can use the...
better_errors is an awesome gem for enhanced error pages in development, featuring a live-REPL for some light debugging...
If you want to do JavaScript-style camelization, ActiveSupport's String#camelize method can actually help you out. Simply pass...
When using TextMate2 with the cucumber bundle, it does not recognize step definitions (e.g. custom_steps.rb) as such but believes they...
Splitting a long method into sub methods is easier in instances since it is in classes. Since...
We now have a gem that supports our form model approach.
Ruby’s model for concurrency is based on threads. It was typical approach for object oriented languages, designed in the...
Batman is an alternative Javascript MVC with a similar flavor as AngularJS, but a lot less features and geared towards...
When you call a method on an object, Ruby looks for the implementation of that method. It looks in the...
Development environment setup Rails Composer Basically a comprehensive Rails Template. Prepares your development environment and lets you select web server...
To print a colored full-width bar on the bash, use this bash script expression: echo -e '\033[37;44m...
rake stats # => LOC per controllers, models, helpers; code ratios, and more rake notes # => collects TODO, FIXME and...
String#indent is not a standard Ruby method. When you use it, be sure to know where this method comes...
Wondering how a specific method on an object is exactly named? You can use Enumerable#grep to detect it in...
When you are working with Backbone models and inheritance, at some point you want to overwrite inherited methods but call...
Warning: Because of (unclear) rounding issues and missing decimal places (see examples below), do NOT use this when dealing with...
If you want to switch to another ruby versions, you have several options, depending on what you want: Do you...