recruiter 1.1.11 → 1.1.12
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25d77e298d3c285b9ddd5a816d38038a3c0afacc
|
4
|
+
data.tar.gz: 0c91e7ae3d7c5f8f0415b990d6a5332974557ff4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0111042a4692dc51840485d6032bce32c7a35aac50f792b562e7ef3e3576622b7f20ac7803c0f65d15ffbf5b8c0ec5e5ebc4d646ebe12c4561a236e6aa1c6bef
|
7
|
+
data.tar.gz: b8b1db2746b33f6030eef1bcf061fb59d02736af9055cd8a455185e926e17d30e416851ed2a82ee59f89aa0719daf4a45f98807a4f060afaed4737d3abfba63d
|
@@ -4,7 +4,7 @@ module Recruiter
|
|
4
4
|
before_action :set_article, only: [:show, :edit, :update, :destroy]
|
5
5
|
|
6
6
|
def index
|
7
|
-
@articles =
|
7
|
+
@articles = articles.page(page).per(per_page)
|
8
8
|
respond_with(:user, @articles)
|
9
9
|
end
|
10
10
|
|
@@ -13,12 +13,12 @@ module Recruiter
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def new
|
16
|
-
@article =
|
16
|
+
@article = user_articles.build
|
17
17
|
respond_with(:user, @article)
|
18
18
|
end
|
19
19
|
|
20
20
|
def create
|
21
|
-
@article =
|
21
|
+
@article = user_articles.build(article_params)
|
22
22
|
crud_flash @article.save
|
23
23
|
respond_with(:user, @article)
|
24
24
|
end
|
@@ -39,12 +39,17 @@ module Recruiter
|
|
39
39
|
|
40
40
|
private
|
41
41
|
|
42
|
-
def
|
42
|
+
def articles
|
43
|
+
return Recruiter::Article.all if current_user.admin?
|
44
|
+
current_user.articles
|
45
|
+
end
|
46
|
+
|
47
|
+
def user_articles
|
43
48
|
current_user.articles
|
44
49
|
end
|
45
50
|
|
46
51
|
def set_article
|
47
|
-
@article =
|
52
|
+
@article = articles.find(params[:id])
|
48
53
|
end
|
49
54
|
|
50
55
|
def article_params
|
data/lib/recruiter/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recruiter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcelo Jacobus
|
@@ -450,6 +450,7 @@ files:
|
|
450
450
|
- db/migrate/20140618170904_create_recruiter_jobs_tags.rb
|
451
451
|
- db/migrate/20140712201534_create_recruiter_articles.rb
|
452
452
|
- db/migrate/20150815184100_add_admin_flag_to_users.rb
|
453
|
+
- db/migrate/20150815200812_add_admin_flag_to_articles.rb
|
453
454
|
- lib/generators/templates/locales/devise.en.yml
|
454
455
|
- lib/generators/templates/locales/devise.pt-BR.yml
|
455
456
|
- lib/generators/templates/locales/en.yml
|