Spring is a Rails application preloader. When debugging e.g. the rails gem, you'll be wondering why your raise, puts...

makandra dev
menuetos.net

MenuetOS is an Operating System in development for the PC written entirely in 32/64 bit assembly language. Menuet64 is released...

Programatically invoke Rails generators Require the generator, instantiate it and invoke it (because generators are Thor::Groups, you need...

docopt.org

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

When you want the table headers to always stay around (e.g. because that table is huuuge), use the code below...

If you want to label things with a color but don't actually care which cholor, you can use the...

So you have a restangular collection and you want to remove an element from it, after you've successfully deleted...

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

github.com

better_errors is an awesome gem for enhanced error pages in development, featuring a live-REPL for some light debugging...

github.com

Now you can say: class Song < ActiveRecord::Base attr_accessor :virtual_attribute assignable_values_for :virtual_attribute do

If you want to do JavaScript-style camelization, ActiveSupport's String#camelize method can actually help you out. Simply pass...

stackoverflow.com

rake -W [substring_of_task]

wiki.macromates.com

When using TextMate2 with the cucumber bundle, it does not recognize step definitions (e.g. custom_steps.rb) as such but believes they...

blog.codeclimate.com

Splitting a long method into sub methods is easier in instances since it is in classes. Since...

lucaguidi.com

Ruby’s model for concurrency is based on threads. It was typical approach for object oriented languages, designed in the...

stackoverflow.com

Check out the jsFiddle Demo. CSS .absoluteCenterWrapper { position: relative; /* Declare this element as the anchor point for centering */ } /* Positioning */ .absoluteCenter...

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

Put the attached file to config/initalizers to ignore some fields for rejecting nested records (e.g. hidden input fields).

requiremind.com

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

When you use a belongs_to or has_many macro you might be surprised that the methods that it generates...

Store each models version in a separate table class Post < ActiveRecord::Base has_paper_trail :class_name => 'PostVersion' end

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