我在我的数据库中有一个列类型TEXT。我应该在API中声明什么类型的参数? params do
requires :body, type: Text
end
上面的代码生成此error: uninitialized constant API::Articles::Text (NameError) 我尝试设置参数作为type: String,但具有ArgumentError我的测试响
所以,我有这个系统我正在使用rails 4和葡萄Api。基本上它汇总了关于在车辆上执行的维护服务的信息。我的模型是这样定义的: # service.rb
class Service < ActiveRecord::Base
has_many :service_items
#service_item.rb
class ServiceItem < ActiveRecord::B