rss2_id added and some changes in form
This commit is contained in:
parent
22fa13b0a5
commit
60fbc344d1
|
@ -4,7 +4,7 @@ class Patent
|
|||
include OrbitModel::Status
|
||||
include Slug
|
||||
|
||||
belongs_to :patent_type
|
||||
has_and_belongs_to_many :patent_types
|
||||
belongs_to :member_profile
|
||||
|
||||
field :patent_title, as: :slug_title, localize: true
|
||||
|
@ -18,6 +18,7 @@ class Patent
|
|||
field :publish_date , :type => Date
|
||||
field :url
|
||||
field :note
|
||||
field :rss2_id
|
||||
field :create_user_id, :type => BSON::ObjectId
|
||||
field :update_user_id, :type => BSON::ObjectId
|
||||
|
||||
|
|
|
@ -4,6 +4,6 @@ class PatentType
|
|||
|
||||
field :title, localize: true
|
||||
|
||||
has_many :patents
|
||||
has_and_belongs_to_many :patents
|
||||
|
||||
end
|
|
@ -53,7 +53,9 @@
|
|||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t("personal_patent.patent_category") %></label>
|
||||
<div class="controls">
|
||||
<%= f.select :patent_type_id, @patent_types.collect {|t| [ t.title, t.id ]} %>
|
||||
<% @patent_types.each do |pt| %>
|
||||
<input type="checkbox" name="patent[patent_type_ids][]" value="<%= pt.id.to_s %>" <%= (@patent.patent_type_ids.include?pt.id) ? "checked=checked" : "" %> /> <%= pt.title %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue