Sequel is a lightweight database access toolkit for Ruby. * Sequel provides thread safety, connection pooling and a concise DSL for constructing SQL queries and table schemas. * Sequel includes a comprehensive ORM layer for mapping records to Ruby objects and handling associated recor...
May 2, 2012 Tagged: vim golf refactoring Comments (View) How to extract an intention-revealing name using Vim This method has a magic number : def wait_time @env[QUEUE_WAIT_HEADER].to_i / 1000 end Let’s extract that to an intention-revealing name . We’ll type: /1000<Enter> # Find the ...
We're pleased to announce that Spree 1.1.0 has been released. We’ve been hard at work the past two months getting this release ready. This is also the first Spree release to support Rails 3.2.×. All it took was 790 commits by 34 different authors (including many first-time committers....
Wednesday, May 2, 2012 at 6:06AM Sometimes it feels like life is just rushing by. Power of graylog2 web interface - A quick look at the sort of information you can extract from this log aggregator. ruby HTTP client performance shootout redux - One for the benchmarking wonks, together ...
Most developers use AR callbacks after_create/after_update/after_destroy to generate background job, expire cache, etc., but they don't realize these callbacks are still wrapped in database transaction, they probably got unexpected errors on production servers. I wrote a post to sugge...
Travis CI announces Pull Request support Posted by rkh on May 02, 2012 — 0 comments Travis CI just announced Pull Request support . Comments Post a Comment Comment abilities for non registered users are currently deactivated, pending time to add a proper CAPTCHA to solve the escal...
and I’m a user-interface designer and Bankwest customer from Sydney (props to Christine at the Randwick branch!). I love the recent design changes to online banking (keep it up!) but there’s one little thing that still drives me nuts: choosing the type of a new payment. Below left is ...
A whirlwind tour of Sinatra’s most interesting features. Configuring Settings Detailed documentation on all of Sinatra’s built-in settings and using set , enable , and disable to configure them. Testing Sinatra with Rack::Test Guide to testing Sinatra apps. Sinatra::Contrib A collecti...
Ruby is a fast language, and a great one in so many ways, but nothing in this world is truly free. It’s very easy to do things that seem inconsequential but that later can bring your application to a grinding halt. In this post, I’ll outline five important ways that you can avoid some...
Next week, we’ll finish up generators by covering overriding default Rails generators like controller or scaffold. Next, we’ll cover the new ActionController API , which makes it dead-easy to implement components in Rails, like the cells plugin. Finally, we’ll show how you can hook no...
If you ever spot room for improvement or an error in the Rails documentation -- and that includes the Rails Guides and the API docs -- they've made the process extremely easy. If you've been waiting for "the right moment" to start contributing to open-source software, this might be it...
É exatamente a mesma coisa mas agora sem a camada extra do RJS que transformava o Ruby em Javascript. E com isso você poderia usar qualquer outra biblioteca como MooTools ou Dojo. Muito simples e pode ser feito hoje, no Rails 2.3.5 atual. O truque é usar ERB , da mesma forma como nos ...
# app running on http://example.com/example get '/foo' do t = %w[text/css text/html application/javascript] request.accept # ['text/html', '*/*'] request.accept? 'text/xml' # true request.preferred_type(t) # 'text/html' request.body # request body sent by the client (see below) reques...
NEW : smart sorting of issues on the chart. Now issues are sorted just like you’d expect them to. NEW : rescheduling takes into account weekends, if this setting is enabled Issues on Gantt chart connected with arrows . Handy! Relations info added to issue tooltip. Fast rescheduling of...
Created: 2001-12-17 19:45:47 GMT Last update: 2001-12-17 19:45:47 GMT Owner: Nobuyoshi Nakada (Projects of this owner ) Homepage: not available Download: http://member.nifty.ne.jp/nokada/archive/overload-0.2.tar.bz2 License: Ruby's Dependency: None Description: Trick for multimethod o...
It is very hard to obtain a full list of web applications defined in the Apache configuration file(s). In other words, it’s hard for Phusion Passenger to know which web applications are deployed on Apache until a web application is first accessed, and without such a list Phusion Passe...
# 関連するクラスを Net というカテゴリにまとめる # このような場合は外側は普通モジュールが利用される # (Net のインスタンスがない。Net を include できるなどのため) module Net class HTTP end class FTP end end obj = Net::HTTP.new # あるいは include Net obj = HTTP.new # 以下のような使い方は組み込みのクラスにも見られる # 利用者は File::Constants を include することで、 # File::RDONLY などと書かずに直...