We use a bizarre, convoluted mechanism for attaching ClassMethods and InstanceMethods modules to ActiveRecord::Base because if we attempt to subclass it in a gem, we don't get a subclass in the purest sense. What we actually get is a new class which ActiveRecord::Base creates. ActiveR...
MiniTest is a fast and lightweight testing library. Here you will learn how to use it in a Rails app for model, helper, and integration testing. The Turn gem is also demonstrated for prettier test output.
This is quite a scary graph but it shows nicely the features you are getting and their cost associated. For instance, the option of having the before and after initialization callback cost you 14% of your CPU time per instantiation, even though you probably almost never use these call...
The JRuby community is pleased to announce the release of JRuby 1.6.7. Homepage: http://www.jruby.org/ Download: http://www.jruby.org/download The primary goal of the 1.6.x series is to round out our 1.9 support by fixing any reported incompatibilities. Of course, as with any JRuby re...
← Jeff Kreeftmeijer Archive Contact MicroGems: five minute RubyGems 03 Oct 2011 tweet! subscribe! Note: This is just something I've been playing around with. I'm not saying you should do this and I'm not implying this is better than what you're doing right now. I'm just sharing some e...
February 23, 2012 Tagged: command line rake ruby shell how to Comments (View) How To Use Arguments In a Rake Task I came across this today. You can write Rake tasks that accept arguments, called like this: rake tweets:send[cpytel] You define the rask task like this: namespace :tweets ...
February 23, 2012 Tagged: ruby rake command line shell Comments (View) Giving a Rake Task Arguments I came across this today. You can write Rake tasks that accept arguments, called like this: rake tweets:send[cpytel] You define the rask task like this: namespace :tweets do desc 'Send ...
The JRuby community is pleased to announce the release of JRuby 1.6.7. Homepage: http://www.jruby.org/ Download: http://www.jruby.org/download The primary goal of the 1.6.x series is to round out our 1.9 support by fixing any reported incompatibilities. Of course, as with any JRuby re...
1| require 'win32ole' 2| 3| module Border 4| def linetype 5| @@linestyles ||= nil 6| if @@linestyles.nil? 7| @@linestyles = {} 8| %w(XlContinuous XlDash XlDashDot 9| XlDashDotDot XlDot XlDouble 10| XlLineStyleNone XlSlantDashDot).each do |linestyle| 11| v = Border.const_get(linestyle)...
Everyday Rails is about using the Ruby on Rails web application framework to get stuff done as a web developer. Learn more. More advice on legacy data migration in Rails What do you do if your legacy data defies convention or is just generally complex? Here are some notes from my rece...
Stop Using the text-indent:-9999px CSS Trick 2010-05-25 The usage of text-indent:-9999px to display a site logo or other image while hiding text should be avoided. It’s a technique used by web spammers trying to game search engines like Google, and is considered spammy behavior. Inste...
markdown-rails: Markdown for Rails views Posted by joliss on February 23, 2012 — 0 comments Writing prose in HTML is icky. I wrote a markdown-rails gem that enables static .html.md views (and partials) written in Markdown.
Blogging and/or setting up a simple site should be a simple proposition. There are a lot of great frameworks out there that handle the software portion of running such a site. However, you don’t just want a stock setup. You have to take into account proper asset caching for performanc...
Green Shoes is one of colorful Shoes, written in pure Ruby with Ruby/GTK2.
Thursday, February 23, 2012 at 5:34AM Very tired of "are we there yet?" emails at the moment. WhySQL - Evernote explains that at their current scale they have no need for NoSQL - and good reasons for ACID. Rails Release Candidates - There's a new round of them out for the 3.0, 3.1, an...
Blogging and/or setting up a simple site should be a simple proposition. There are a lot of great frameworks out there that handle the software portion of running such a site. However, you don’t just want a stock setup. You have to take into account proper asset caching for performanc...
December 10, 2010 Tagged: tools unix vim tmux productivity Comments (View) Love, hate, & tmux It seems like everywhere I turn lately, I run into tmux. Nick , Josh , Harold , and Goose are running their editor+shell combos inside of tmux on a daily basis. When I wanted to know more abo...
I’m so happy to announce that Engine Yard will be sponsoring Season 2 of the Voices of the ElePHPant . If you’re not familiar with this podcast, every week, Cal Evans interviews various members of the PHP Community who are making efforts in moving the PHP ecosystem forward. It’s a gre...
because of argument safety. Putting the variable directly into the conditions string will pass the variable to the database as-is . This means that it will be an unescaped variable directly from a user who may have malicious intent. If you do this, you put your entire database at risk...
先日の記事Rails 3.x 時代のテストフレームワーク で、私は「Railsのテストを取り巻く状況が複雑に拡散しつつある」と書き、デファクトスタンダードがまだ現れていないんじゃないか、ということを示唆しました。 その後、この件について他の人が書いているのを更に読んだり、実際にフレームワークを使ってみたりして、わかったことや考えたことをまとめてみようと思います。 まず、Railsで使用できる代表的な4つのテストフレームワーク Test::Unit, RSpec , Shoulda , Cucumber の基礎知識と相互関係について。 Test::Unit は、Ru...
Instant Rails is a one-stop Rails runtime solution containing Ruby, Rails, Apache, and MySQL, all pre-configured and ready to run. No installer, you simply drop it into the directory of your choice and run it. It does not modify your system environment. This project has not yet catego...
It looks like my post on Ruby 1.9.0 performance is drawing some criticism over on on reddit . I already updated the original post to deal with a comment by ‘gravity’. In a later comment, ‘Ganryu’ wrote “I don’t get it… isn’t this mainly IO dependent?” Since he doesn’t have access to t...