Do you use ActiveRecord? Tired of writing in console all those verbose Arel methods? Well short_arel is for you!
The idea is to reduce to the minimum the numbers of characters you have to type to perform ActiveRecord queries. short arel just aliases long-named methods with its short version, so instead of having to write:
Post.where(:public => true).includes(:comments).order('edited_at ASC')
you could write
Post.w(:public => true).i(:comments).o('edited_at ASC')
This is the reason: http://codebrawl.com/contests/terminal-admin
Put this file in your rails directory. Load console (rails c) and require the file
require './short_arel.rb'
joshk: I know it is not great, but still I think the concept is interesting. Still everybody is welcomed to take this concept and do something great (as opposed to this lousy script XDD)
jeffkreeftmeijer: I know what you mean, when you take a look at that list it feels overwhelming but the ideas is not having to remember them but knowing how to build them. Except for a few cases the short alias corresponds to the first letter of the method name (or the first letter of each word in the method name)
In any case, ideas al welcomed, I just wanted to enter in this week codebrawl contest and didn't had much time to do something fancier ; )