tophold_engine 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ class SubTopic
2
+
3
+ include Mongoid::Document
4
+
5
+ field :title, type: String
6
+
7
+ field :content, type: String
8
+
9
+ belongs_to :creator, class_name: "User", foreign_key: :creator_id
10
+
11
+ belongs_to :topic
12
+
13
+ end
data/app/models/tag.rb CHANGED
@@ -5,7 +5,7 @@ class Tag
5
5
 
6
6
  field :title, type: String
7
7
 
8
- recursively_embeds_many index: true, background: true
8
+ recursively_embeds_many
9
9
 
10
10
  embedded_in :article, ploymorphic: true
11
11
 
data/app/models/user.rb CHANGED
@@ -3,4 +3,6 @@ class User < ActiveRecord::Base
3
3
 
4
4
  has_one :user_document, :class_name => "UserDocument"
5
5
 
6
+ has_many :sub_topics, foreign_key: :creator_id
7
+
6
8
  end
@@ -1,6 +1,6 @@
1
1
  #encoding: utf-8
2
2
 
3
- Mongoid.add_language("zh-CN")
3
+ #Mongoid.add_language("zh-CN")
4
4
 
5
5
  module Mongoid
6
6
 
@@ -1,3 +1,3 @@
1
1
  module TopholdEngine
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tophold_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -75,13 +75,13 @@ files:
75
75
  - app/models/article.rb
76
76
  - app/models/article_record.rb
77
77
  - app/models/comment.rb
78
+ - app/models/sub_topic.rb
78
79
  - app/models/tag.rb
79
80
  - app/models/topic.rb
80
81
  - app/models/user.rb
81
82
  - app/models/user_document.rb
82
83
  - config/initializers/basic_configatron_settings.rb
83
84
  - config/initializers/mongoid_extends_patch.rb
84
- - config/initializers/resque_redis_host_settings.rb
85
85
  - lib/serve_gridfs_image.rb
86
86
  - lib/tophold_engine.rb
87
87
  - lib/tophold_engine/engine.rb
@@ -1,6 +0,0 @@
1
- #encoding: utf-8
2
- require 'resque'
3
-
4
- Resque.redis = configatron.redis.send(Rails.env).host + ':' + configatron.redis.send(Rails.env).port
5
-
6
- Resque.redis.namespace = "resque:tophold"