⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 project.rb

📁 敏捷开发 ruby on rails 实现的一个购物车系统
💻 RB
字号:
class Project < ActiveRecord::Base  has_and_belongs_to_many :developers, :uniq => true    has_many :topics    # :finder_sql  => 'SELECT * FROM topics WHERE (topics.project_id = #{id})',    # :counter_sql => 'SELECT COUNT(*) FROM topics WHERE (topics.project_id = #{id})'    has_many :replies, :through => :topics do    def find_recent(params = {})      with_scope :find => { :conditions => ['replies.created_at > ?', 15.minutes.ago] } do        find :all, params      end    end  endend

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -