27 Mar '12, 1pm

Ruby on Railsで複合キーを扱う(3)

# coding: utf-8 require 'spec_helper' describe Department do let(:department0) { FactoryGirl.create(:department, code: "robot", name: "Department0", started_on: Date.new(2000, 1, 1), ended_on: Date.new(2002, 1, 1)) } let(:department1) { FactoryGirl.create(:department, code: "robot", name: "Department1", started_on: Date.new(2002, 1, 1), ended_on: nil) } let(:department2) { FactoryGirl.create(:department, code: "ship", name: "Department1", started_on: Date.new(2002, 1, 1), ended_on: nil) } before do department0 department1 department2 end it "部門(department)を日付と部門コードで検索できる" do DurationLimited.current_date = Date.new(2001, 1, 1) dep0 = Department.find("robot") dep0.name.should == department0.name DurationLimited.current_date = Date.new(2003, 1, 1) dep1 = Department.find("robot") dep1.name.should == department1.name end end

Full article: http://www.oiax.jp/rails/zakkan/composite_primary_keys_3....

Tweets

Ruby on Rails Guides: Rails Form helpers:

guides.rubyonrails.org 28 Mar '12, 5am

Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to wr...

Sam Ruby: Keeping it on the Rails

intertwingly.net 28 Mar '12, 9pm

The previous error that was caught was connection pool of new applications have size 1 . This demonstrates the unique valu...

“Resqueを利用したRailsでの非同期処理/バッチ処理 - Rails 雑感 - Rub...

oiax.jp 28 Mar '12, 6am

Railsアプリケーションの中で非同期処理 (バッチ処理)を実現したいことがあります。例えば、こんな場合です。 ユーザーが「送信」ボタンを押したら数千通のメールを送る。 数千通のメールを送るにはかなり時間がかかるので、その処理は後回しにして、ユ...

Ruby Best Practices - Rails Modularity for Lazy...

blog.rubybestpractices.com 28 Mar '12, 4am

Rails Modularity for Lazy Bastards 2009-04-16 04:31, written by Gregory Brown When we develop standalone systems or work o...

10 websites built using ruby on rails

10 websites built using ruby on rails

railshosting.org 24 Mar '12, 10pm

The top 10 websites built with Ruby on Rails Posted by Collin on 05/19/2011 in Rails Tutorials . Ruby is a growing force i...

integrating PHP and Ruby On Rails - Ruby Forum

ruby-forum.com 24 Mar '12, 7am

check out if they have a REST-api and access this API using one of the numerous tools available like ActiveResource or Htt...

What’s New in Edge Rails #14: Week of March 18 ...

afreshcup.com 26 Mar '12, 1pm

A Fresh Cup is Mike Gunderloy's software development weblog, covering Ruby on Rails and whatever else I find interesting i...

Is "Working with Rails" still relevant? If yes ...

workingwithrails.com 26 Mar '12, 7am

Kewill is een snel groeiend internationaal bedrijf met een focus op logistiek. Wij bouwen Service Logistieke software voor...

Getting Started with Rails:

guides.rubyonrails.org 21 Mar '12, 10pm

Rails is a web application development framework written in the Ruby language. It is designed to make programming web appl...

Insane how much faster Rails 3.2 is in the deve...

guides.rubyonrails.org 23 Mar '12, 4pm

Rails 3.2 comes with a development mode that’s noticeably faster. Inspired by Active Reload , Rails reloads classes only w...

Virtualize This – Instant Rails in a Virtual Bo...

engineyard.com 22 Mar '12, 11am

Our training team, Engine Yard University, will also be using virtualization. We decided to offer our next Zero to Rails 3...

Jay Fields' Thoughts: Ruby: Defining Class Meth...

blog.jayfields.com 25 Mar '12, 12am

"This [, Class.method,] is the version that recent Java/C# converts seem to prefer. I'm not a big fan of this version beca...

The Building Blocks of Ruby « Katz Got Your Ton...

yehudakatz.com 23 Mar '12, 3am

Great article. However, I’ve been looking for an article that compares Rails and Django, for the purposes of creating a we...

ZOMG! We're in Ruby Weekly!

rubyweekly.com 22 Mar '12, 12pm

No big announcements this week, but due to travel, next week's Ruby Weekly might be a bit skinnier than usual, late, or no...

The Complete Guide to Rails Plugins: Part I | R...

nubyonrails.com 15 Mar '12, 7pm

# Use the generator to make a transmogrifier plugin ./script/generate plugin transmogrifier create vendor/plugins/transmog...