diff --git a/app/models/patent.rb b/app/models/patent.rb index 063fac1..b3b467b 100644 --- a/app/models/patent.rb +++ b/app/models/patent.rb @@ -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 diff --git a/app/models/patent_type.rb b/app/models/patent_type.rb index e5e90f4..8202881 100644 --- a/app/models/patent_type.rb +++ b/app/models/patent_type.rb @@ -4,6 +4,6 @@ class PatentType field :title, localize: true - has_many :patents + has_and_belongs_to_many :patents end \ No newline at end of file diff --git a/app/views/admin/patents/_form.html.erb b/app/views/admin/patents/_form.html.erb index c39dac7..85ce1f0 100644 --- a/app/views/admin/patents/_form.html.erb +++ b/app/views/admin/patents/_form.html.erb @@ -53,7 +53,9 @@