20 April 2014

The Ruby Reflector

Topic

Mongoid

  Source Favicon
By Peter Cooper of Ruby Inside over 2 years ago.
Email

…for a Senior Developer . Trivia: Durran Jordan, creator of Mongoid, works there, so you'll be in good company! — click here to learn more.

Ruby on Rails or Python Django superstar for web+mobile startup - New York, New York

Collectrium , a technology company focused on elegant tools for art collectors, galleries, and art fairs is looking for a Ruby on Rails or Python Django superstar for their Web + mobile startup — click here …

rubyinside.com Read
  Source Favicon
By trevorturk of Engine Yard Developer Blog over 2 years ago.
Email

GridFS store. There's ORM support available for ActiveRecord, Mongoid, DataMapper, Sequel, Mongo Mapper, CouchDB, and more. Image processors are available for RMagick, ImageScience, MiniMagick.

Let's see this modularity first hand by building up a CarrierWave uploader from scratch.

To begin with, we'll install CarrierWave: gem install carrierwave

Then, we can make the world's shortest uploader: require 'carrierwave'

class MyUploader …

engineyard.com Read
  Source Favicon
On Momoro Machine 3 years ago.
Email

…production database. I've accidentally basically dropped the production database (see my post on Mongoid and delete_all). If he will fuck up, so will you. Don't lie and make it seem like the problem wasn't your fault. Don't hide data that will prevent people from realizing that it's your fault. Don't wait 3 days to tell anyone because you're afraid of the consequences. Unless you knowingly did something outright malicious, you're not going to lose your …

themomorohoax.com Read
  Source Favicon
By Trevor of Trevor Turk 3 years ago.
Email

Let's say you want to have a log of all outgoing emails in your Rails 3 app. Thanks to some pretty sweet notification support in the Mail gem, it's really simple. Here's an example using Mongoid:

Initially, I was logging the entire contents of the email, but that included attachments as well. So, now I'm just logging the body. I wonder if there's a better choice of what to log, though...

Any ideas?

almosteffortless.com Read
  Source Favicon
By Ethan Gunderson of RubyLearning Blog over 3 years ago.
Email

Ruby developers may jump right into the warm embrace of the Active Record replacements Mongoid and MongoMapper, that often robs developers of a valuable learning experience.

The MongoDB Ruby driver is not only simple to use, but it will get you familiar with how queries look and how they operate. Armed with this knowledge, moving into an ORM becomes much easier. You'll not only be able to understand what is abstracted away, but you'll be able to spot bad …

rubylearning.com Read
  Source Favicon
By Ryan Bates of RailsCasts over 3 years ago.
Email

Mongoid is a polished, high-level Ruby gem for accessing MongoDB. Here I cover installation, adding fields, validations, associations, and keys.

railscasts.com Read
  Source Favicon
On Momoro Machine over 3 years ago.
Email

What do you think the below code would do in Mongoid? 1 2 3 4 5 Post .where( :author_id => 8 ).delete_all

It would delete all the posts where the author ID is 8, right? Right? Riiight? WRONG ! FOOL! IT DELETES THE ENTIRE FUCKING POSTS COLLECTION . No joke.

Whereas in ActiveRecord Post.where(:author_id => 8).delete_all would delete ONLY THE POSTS WITH AUTHOR ID 8 , Mongoid decided to JUST REMOVE THE ENTIRE COLLECTION . AWESOME SURPRISE !!!!!!!

This leads to awesomeness and unicorns when done in production.

themomorohoax.com Read
  Source Favicon
On Alex R. Young over 3 years ago.
Email

If you're using Mongoid and OpenID, you might be able to use db_store.rb . You could even improve it and release it!

Meanwhile, in Tokyo

I went to the Tokyo Rubyist Meetup . Contrary to popular belief, I don't travel the world going to programmer meet-ups. It was actually my wife who arranged it — she's not a programmer, she worked with one of the organisers when translating Basecamp . It was a good event for her to attend, because the …

alexyoung.org Read
  Source Favicon
By David of Riding Rails - home over 3 years ago.
Email

…-compliant ORM (like DataMapper, Sequel, or Mongoid), you will be able to use features like form_for, link_to and redirect_to with objects from those ORMs without any additional work.

Official plugin APIs

We also rewrote Railties with the express goal of using the new plugin API for all Rails frameworks like Active Record and Action Mailer . This means that Rails plugins like the ones for DataMapper and RSpec have access to all …

weblog.rubyonrails.org Read
  Source Favicon
By Iain Hecker of Adventures with Ruby over 3 years ago.
Email

This could in theory also be done for other Rails 3 compatible ORMs like Mongoid, but I haven't looked into that yet.

Hirb

Hirb formats objects into pretty tables, as you can see in the picture above. It also provides some scrolling possibilities like the command line tools less and more. Very handy!

Wirble

The first IRB extension anyone uses. Wirble provides you with history and syntax highlighting.

Awesome Print

While Wirble colorizes the output …

iain.nl Read