阅读背景:

如何将值从控制器传递给模型?

来源:互联网 
class Task < ActiveRecord::Base
  has_many :notes, :as => :notable,  :dependent => :destroy
  has_many :work_times, :dependent => :destroy
end

class WorkTime < ActiveRecord::Base
  belongs_to :task
end


class NotesController < ApplicationController


      end
    end
####
class Task < ActiveRecord::Base
  has_many :not



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: