我正在学习Ruby on Rails,并开始我通过http://guides.rubyonrails.org/getting_started.html#showing-articles来制作这个小博客应用程序。 现在我在5.10,我需要这样当用户添加了一个丝毫不差,长度以验证添加到表单短于5 所以这是我articles_controller.rb: class ArticlesController
我使用https://github.com/bernat/best_in_place宝石编辑一个表单字段 好像显示为当前值的文字“”。 但是上单击下拉菜单具有当前值: Here is the code I am using:
%tr
%td #{best_in_place sku.product, :name, as: :select, :class=>"best_in
我有三种模型交易,CellPhoneAttribute和手机设备。 模型之间的关系是: class CellphoneEquipment < ActiveRecord::Base
belongs_to :cellphone_deal_attribute
end
class CellphoneAttribute < ActiveRecord::Base
ha