StatusCode: Our Weekly Programming Newsletter. You're not just a Rubyist, you're a software developer, right? :-) Check out StatusCode Weekly, our language and architecture agnostic newsletter that covers the biggest news across the entire software development world.

RubyFlow The Ruby and Rails community linklog


The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Save typing in rails/console with this 3 packs

User rails_console_toolkit to add super-fast shortcuts to fetch records, benchmark your code, reload!, and exit.

Read more in the README...


# config/initializers/console.rb
RailsConsoleToolkit.model_helper 'Product', by: %i[:name, :slug]
# bin/rails console
> product('black-tshirt') # => #<Product id: 123, slug: "black-tshirt", …>
> product.slug            # => "black-tshirt"
> product(456)            # => #<Product id: 456, slug: "red-tshirt", …>
> product.slug            # => "red-tshirt"

First add gem 'rails_console_toolkit' to your Gemfile!


This looks very helpful. One small item. In the Readme, for each example you have the same require statement (for aliases), when I assume they should all be different.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in