Ruby on Rails 4 and Batman.js

Batman.js is a lightweight JavaScript MVC framework with a Rails-friendly style for building small client-side apps and blog tutorials.

JavaScript: How to log execution times to your browser console

Measure JavaScript code duration in the browser with console.time and console.timeEnd, including asynchronous flows and separate code locations. Works in modern browsers and recent Internet Explorer.

Techniques for authentication in AngularJS applications

Authentication and access control in AngularJS apps often need a clear client-side pattern for current user state and protected views.

Why belongs_to/has_many cannot overwrite methods with the same name

ActiveRecord association macros do not replace existing instance methods with the same name, so custom methods can still shadow belongs_to and has_many accessors.

ActiveRecord 2.3: Nested attribute changes disappear

ActiveRecord 2.3.x can reload has_many nested associations and discard unsaved form changes during validations, callbacks, or rerendered error pages.

Firefox: Remove dotted border from focused buttons

Firefox renders a dotted inner border on focused form buttons; removing it with ::-moz-focus-inner cleans up the appearance but reduces keyboard focus visibility.

Papertrail - Store each models version in a separate table

Keep versioned records in a dedicated table with PaperTrail, using a custom version class such as PostVersion for each model.

Collection of Rails development boosting frameworks

Rails app setup and admin scaffolding can speed up project bootstrapping, data management, and CRUD interfaces with templates and generators.

Bash: Heavy headings for CLI

Colored full-width headers in the terminal help separate CLI output and highlight sections using ANSI escape codes in Bash or Ruby.

Some nifty Rails Rake tasks

Useful Rails rake tasks expose code statistics, comment tags, and environment details for quick project inspection.

How to force a client-side refresh on a new favicon

Browsers cache favicons aggressively, so changing a site icon often requires a new URL or fingerprinted asset to make visitors see the update.

String#indent: Know your definitions!

String#indent is not part of standard Ruby and may come from gems with unstable internal APIs. Defining it yourself avoids breakage when dependencies change.

Spreewald version 0.9.4 released

Fixes for flaky browser tests in Spreewald 0.9.4, including a resolved “I click on ...” step and broader Selenium retry handling.

Fix when assigning nested attributes raises "undefined method `to_sym' for nil:NilClass"

Nested attribute assignment can fail when a MySQL table lacks a primary key, triggering to_sym on nil. Adding a primary key index or setting self.primary_key = "id" fixes the lookup.

Debugging in Cucumber

Useful Cucumber steps help inspect a Capybara session by opening the current page in a browser or starting an interactive debugger.

Unicode support in MySQL is ...

MySQL 5.x rejects Unicode characters above U+FFFF, so emoji and many historic scripts cannot be stored in UTF-8 columns.

Cucumber does not find neither env.rb nor step definitions when running features in nested directories

Feature files in nested directories can stop Cucumber from loading env.rb and step definitions unless the features directory is required explicitly.

Cucumber: Wait until CKEditor is loaded

Timing issues can cause undefined errors when interacting with CKEditor in Cucumber tests. Waiting for the editor to reach ready avoids flaky WYSIWYG input steps.

Using Arel to Compose SQL Queries

Arel provides a Rails API for building SQL queries when where hashes are too limited. It exposes lower-level query composition through ActiveRecord.

Namespacing: why `uninitialized constant` error may occour in `development` but not in `test` environment

Namespaced Ruby classes can raise uninitialized constant in development when autoloading misses a nested class, while test may pass because everything is already loaded.

Howto prompt before accidentally discarding unsaved changes with JavaScript

Warns users before leaving a page with unsaved form data or dirty CKEditor content, helping prevent accidental loss during navigation or submit handling.

Make custom web font available within CKEditor content

Custom web fonts do not appear inside CKEditor content unless the editor loads the font CSS through config.contentsCss.

Redis Desktop Manager

Cross-platform open source Redis administration GUI for managing databases, replacing slow, clunky tools with a desktop client.

Rails 4 Engines - TechRabbit

A modular Rails architecture can balance the simplicity of a single app with the separation of multiple services. Rails engines provide shared structure without the overhead of a full service-oriented setup.