23 April 2014

The Ruby Reflector

Topic

Attachment

  Source Favicon
By Mike Gunderloy of A Fresh Cup almost 2 years ago.
Email

attachinary - Attachment handler for Rails that uses the Cloudinary service for storage. This looks like it could simplify code a lot.

Dumper - Database backup in the cloud. Which means one less thing to fuss with configuring yourself.

MySQL is bazillion times faster than MemSQL - Pick a benchmark, any benchmark.

Foodcritic - A lint tool for Chef cookbooks.

Mozilla Launches a Speedy and Powerful Upgrade to Mobile Browsing with Firefox

afreshcup.com Read
  Source Favicon
By Mike Gunderloy of A Fresh Cup 1 year ago.
Email

pestilence - Some nasty JavaScript tricks.

splinter - Additional syntactic sugar for Capybara and RSpec.

Jeff's Guide to Installing Ruby on Rails - Starting point for beginners. SignedForm - Attach digital signatures to forms in Rails to synchronize permitted fields with your application with no further code.

afreshcup.com Read
  Source Favicon
Email

cd53485 and 61a0536 ), and added backward compatibility for Attachment#url ( 93faccf ).

Then Jon released paperclip 2.4.5 ( 94d35f9 and 75ba69d ).

factory_girl

Let's start with the refactorings this week for our test fixture gem, factory_girl . Joshua Clayton ( joshuaclayton ) moved the proxy strategy checks to the proxy class itself ( a09ec68 ). He removed some private methods by leaning on Hash#except …

robots.thoughtbot.com Read
  Source Favicon
By John Resig of John Resig over 1 year ago.
Email

// Attach the i18n property to the express request object

// And attach helper methods for use in templates

I18n. expressBind ( app, {

// setup some locales - other locales default to en silently

locales: [ 'en' , 'de' ]

} ) ) ;

// Set up the rest of the Express middleware

app. use ( app. router ) ;

app. use ( express. static ( __dirname + '/public' ) ) ;

} ) ;

Inside your Express view:

module. exports = {

index: function ( req, …

ejohn.org Read
  Source Favicon
By Assaf of Labnotes almost 2 years ago.
Email

Attach meaning to each metric by placing it in context and defining the relationship between the metric and your goal, and avoid making the metric a goal in itself.

• Use multiple metrics to track different dimensions of your goal, but avoid demotivating a team by using too many metrics.

Familiar Intuition Design :

Interaction Design asks the "How" question a lot: how can the user accomplish this goal they need to accomplish? How can our interface make it clear …

blog.labnotes.org Read
  Source Favicon
Email

7478455 ) is similar to that for geometry parsing: pass a custom interpolator to the Attachment through has_attached_file : has_attached_file :avatar, :interpolator => InterpolatorWithNormalization.new

This change takes place in the Attachment class. Before: module Paperclip class Attachment def interpolate(pattern, style_name = default_style) Paperclip::Interpolations.interpolate(pattern, self, style_name) end end end

After: module Paperclip class …

robots.thoughtbot.com Read
  Source Favicon
Email

def new(attachment, attachment_options) @ attachment = attachment @attachment_options = attachment_options end

def for(style_name, options) dimensions = db.select_row("SELECT width, height FROM styles WHERE style_name = ?", style_name) "/assets/images/#{dimensions['width']}/#{dimensions['height']}/#{@attachment.id}.jpg" end end

Refactoring to add functionality? Heck yeah! ( bc5c51d )

factory_girl

A bug fix and the …

robots.thoughtbot.com Read
  Source Favicon
Email

…processors will be!), he did manage to decouple the Interpolations class from the Attachment class, which may help with the paperclip-extended plugin ( 7478455 ) and abstract out the geometry string parser from the Thumbnail class, which may be helpful to the papermill plugin ( eebc7d9 and 3f7aee3 ). Bert Goethals ( Bertg ) submitted a tiny but important patch to allow plugins to override whether to perform post-processing callbacks, …

robots.thoughtbot.com Read