我有一个简单的预订系统: class User < ActiveRecord::Base
has_many :appointments
has_many :bookings
end
class Appointment < ActiveRecord::Base
belongs_to :booking
belongs_to :user
end
cla
我在导轨3楼的模型 class A < ApplicationController
has_many :b
end
class B < ApplicationController
has_many :c
belongs_to :a
end
class C < ApplicationController
belongs_to :b
end
我正在开发一个应用程序,只为登录用户提供大型视频。 为了保持这些视频的私密性,我把它们放在Rails项目的一个私人文件夹中,让Rails为它们服务,而不是使用公共文件夹并排除来自apache的请求(以避免直接链接到它们)。 我在控制器中的操作是这样的: def video
respond_to do |format|
format.mp4{
send_file