好好学习,天天向上。
浙江联通也有问题。
跨 Model 的复杂逻辑,我现在都放到 Service 对象中了。
Ransack +1
特斯拉
每天看你们调侃那些猎头,也是一个乐趣。
顶光明。
真不错。
干嘛用的?
真不错。
你的意思是,股份才是王道?
楼主弟兄,对不住。
刚看到消息,caoz 确实被坑了。我操,这年头友谊不值钱吗?
蔡文胜为了点破钱,真的啥事都能干出来。以后哪个创业者还敢要他的臭钱?
谁会相信连头像都不上传的人散布的谣言。
好绕。
:plus1:
可能是
良心企业。
报名,嘎嘎
这是几年前写的吗?
下周深入研究一下,嘎嘎
class Paper
has_many :authors, through: :paper_authors
has_many :paper_authors
accepts_nested_attributes_for :authors
end
class author
has_many :papers, through: :paper_authors
has_many :paper_authors
end
class PaperAuthor
# paper_id
# author_id
# role
# priority
end
建议关系表中增加 priority 和 role 两个属性
priority:第一作者、第二作者、第三作者 role:通讯作者,普通作者
用 accepts nested attributes
<%= simple_form_for @papers do |f| %>
<%= f.input :title, label: "标题" %>
<%= f.simple_fields_for :articles do |builder|%>
<fieldset>
<%= builder.input :author_id, as: :select, label: "作者" %><br/>
....
</fieldset>
<% end -%>
<% end -%>
明早贴几张未婚美女图吧。😄
作者没学过统计学
关键是内容 +1