2011å¹´08æ25æ¥16:55 ã«ãã´ãªrailsactiverecord Rails3ã®ActiveRecodeã§è¤æ°ã®whereæ¡ä»¶ãORã§æ¸ã Rails3ã«ãªã£ã¦ããArelãå°å ¥ããã¦named_scopeã便å©ã ãªããã¨æãã¤ã¤ããwhereæ¡ä»¶ãORã§æ¥ç¶ããã«ã¯ã©ãããã ï¼ã£ã¦ ãã¨ã§èª¿ã¹ã¦ã¿ãã â ä»åã®è¦ä»¶ 1.Employeeãã¼ãã«ããååï¼æ¼¢åï¼ã§æ¤ç´¢ã§ããã 2.Employeeãã¼ãã«ããååï¼ã«ãï¼ã§æ¤ç´¢ã§ããã 3.ã«ãã§ãæ¼¢åã§ãæ¤ç´¢ã§ããã 4.æ¤ç´¢å¯¾è±¡ãã£ã¼ã«ãï¼å§ãåãã»ã¤ãã¡ã¤ï¼ãåçã«æå®ã§ããã ä¾ãã°Employeesãã¼ãã«ã以ä¸ã®ããå ´å class CreateEmployees < ActiveRecord::Migration def self.up create_table :employees do |t| t.string
{{#tags}}- {{label}}
{{/tags}}