If you parse this Yaml ... yes: 'Totally' no: 'Nope' ... you get this Ruby hash: { true: 'Totally', false: 'Nope' }

stackoverflow.com

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...

guides.rubyonrails.org

config.action_controller.action_on_unpermitted_parameters enables logging or raising an exception if parameters that are not explicitly permitted are...

github.com

quiet_assets helps with disabling asset pipeline log messages in the development log. When the gem is added, asset pipeline...

Edge Rider gives your relations a method #origin_class that returns the class the relation is based on.

makandra dev

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...

With this command you can initiate an application restart without touching restart.txt. Unlike touching restart.txt, this tool initiates the restart...

If you regularly get ActionView::MissingTemplate exceptions, maybe some bot visits your site requesting silly formats like: http://www.rails-app.com/makandra.html-username-2000...

If you are using Angular and want something like Rails' simple_format which HTML-formats a plain-text input into...

makandra dev
sitepoint.com

A look at Prawn, PDFKit, and Wicked PDF

robots.thoughtbot.com

Declare an enum attribute where the values map to integers in the database, but can be queried by name.

everydayrails.com

I recently had a need to demonstrate a data-heavy application to potential customers. Demonstrating the application with bogus numbers...

medium.com

When you, as a developer, look at the choices used to build a particular application, you’re blown away at...

gist.github.com

How to remove/disable the automatic XSS protection helper html escaping for Rails 3. This is probably a horrible idea.

By default, Rails' validates_uniqueness_of does not consider "username" and "USERNAME" to be a collision. If you use MySQL...

requiremind.com

Batman is an alternative Javascript MVC with a similar flavor as AngularJS, but a lot less features and geared towards...

Development environment setup Rails Composer Basically a comprehensive Rails Template. Prepares your development environment and lets you select web server...

makandra dev

rake stats # => LOC per controllers, models, helpers; code ratios, and more rake notes # => collects TODO, FIXME and...

makandra dev

Just found out about a great feature in Rails that seems to be around since Rails 2. Start a console...

faviconit.com

Eduardo Russo was tired of complex favicon creation and created his own favicon generator. It's really easy and allows...

String#indent is not a standard Ruby method. When you use it, be sure to know where this method comes...

You might have a table without a primary key set in MySQL. You can fix this by adding a primary...

Usually, Cucumber feature files live in features/. When you group them in sub directories, make sure to add -r features...