homeland-jobs 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/homeland/jobs/jobs_controller.rb +23 -0
- data/config/routes.rb +1 -1
- data/lib/homeland/jobs/engine.rb +1 -3
- data/lib/homeland/jobs/version.rb +1 -1
- metadata +2 -2
- data/app/controllers/jobs_controller.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4b17df6ecdd807228db94f72e35bff85ffb376a
|
4
|
+
data.tar.gz: 03c91dcd0b527fb43a89fa307f168ec4b41038fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f7207e0d73ff668afaa4faae42b4ceeff16181598dd4b95fd6bfb9ab547b1f69c39f4a5e95d20a26025ec7200be57bc8e5d372ad11235dc9423dd5e5c3144a8
|
7
|
+
data.tar.gz: f728612e72205396974a39d691d4d929d1a0228c5d61be8cc5cb0fc0363ad422b27467b2a671e62d11b4f882e98b3b761dc576d09eae140e204c346df0acc497
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Homeland::Jobs
|
2
|
+
class JobsController < ::ApplicationController
|
3
|
+
before_action :set_node
|
4
|
+
|
5
|
+
def index
|
6
|
+
@suggest_topics = Topic.where(node_id: @node.id).suggest.limit(3)
|
7
|
+
suggest_topic_ids = @suggest_topics.map(&:id)
|
8
|
+
@topics = Topic.where(node_id: @node.id)
|
9
|
+
@topics = @topics.where.not(id: suggest_topic_ids) if suggest_topic_ids.count > 0
|
10
|
+
@topics = @topics.last_actived.includes(:user).page(params[:page])
|
11
|
+
render '/topics/index' if stale?(etag: [@node, @suggest_topics, @topics], template: '/topics/index')
|
12
|
+
end
|
13
|
+
|
14
|
+
def show
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def set_node
|
20
|
+
@node = Node.find_builtin_node(25, '招聘')
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/config/routes.rb
CHANGED
data/lib/homeland/jobs/engine.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: homeland-jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
@@ -34,7 +34,7 @@ files:
|
|
34
34
|
- MIT-LICENSE
|
35
35
|
- README.md
|
36
36
|
- Rakefile
|
37
|
-
- app/controllers/jobs_controller.rb
|
37
|
+
- app/controllers/homeland/jobs/jobs_controller.rb
|
38
38
|
- config/routes.rb
|
39
39
|
- lib/homeland/jobs.rb
|
40
40
|
- lib/homeland/jobs/engine.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
class JobsController < ApplicationController
|
2
|
-
helper Rails.application.routes.url_helpers
|
3
|
-
|
4
|
-
before_action :set_node
|
5
|
-
|
6
|
-
def index
|
7
|
-
@suggest_topics = Topic.where(node_id: @node.id).suggest.limit(3)
|
8
|
-
suggest_topic_ids = @suggest_topics.map(&:id)
|
9
|
-
@topics = Topic.where(node_id: @node.id)
|
10
|
-
@topics = @topics.where.not(id: suggest_topic_ids) if suggest_topic_ids.count > 0
|
11
|
-
@topics = @topics.last_actived.includes(:user).page(params[:page])
|
12
|
-
render '/topics/index' if stale?(etag: [@node, @suggest_topics, @topics], template: '/topics/index')
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
|
17
|
-
def set_node
|
18
|
-
@node = Node.find_builtin_node(25, '招聘')
|
19
|
-
end
|
20
|
-
end
|