recruiter 1.1.9 → 1.1.10

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: aaeb83e68215a741a1984fcb3ac47c9953c9bae7
4
- data.tar.gz: 389715a73e04626f87de1faa45f7e88c1a551c7b
3
+ metadata.gz: 41e685732350d130de4cb7d5aef746ab960349d0
4
+ data.tar.gz: 898c505037dd6ed6c6a785a5c9213815b1addfb6
5
5
  SHA512:
6
- metadata.gz: 4a4fa39351e646b03e9608f1fe72a91483d5dbdd08f6be39c50aa65ff9d06dfe416cb4d0b3db3b8295600a867494ea9ede372b2131a7211b9f95418e95169919
7
- data.tar.gz: 29d2cf1dd4ecc8488ee042a4a72ed3166c89f0bdfb88e86b23ca1cd7184f0be3dbc0bf874c003190d07c282b6a6de65fd783f4e2b5f5abccf2fabfedf7f3b151
6
+ metadata.gz: f7809d0040efc229c6ac836b105d07bfb9e58bca8164cf6e460fd7ed0ab2c221a612543f46f00a8dbf0f8d3c0945dd104ff524b4af6cec6fbe632479a29b4e78
7
+ data.tar.gz: 1bfc40b09113040afde2483edf71acd7ddc16b6dc49570c8a2774b2ce680ad4d0f2306173e6ad44ece765cad17d69893200d7d092d66873f70f72eb50bf4a73a
@@ -4,7 +4,7 @@ module Recruiter
4
4
  before_action :set_job, only: [:show, :edit, :update, :destroy]
5
5
 
6
6
  def index
7
- @jobs = scope.page(page).per(per_page)
7
+ @jobs = jobs.page(page).per(per_page)
8
8
  respond_with(:user, @jobs)
9
9
  end
10
10
 
@@ -17,14 +17,14 @@ module Recruiter
17
17
  end
18
18
 
19
19
  def new
20
- # TODO: This fixes issue #10. Not a beautiful think to do here
20
+ # TODO: This fixes issue #10. Not a beautiful thing to do here
21
21
  flash.delete(:alert)
22
- @job = scope.new
22
+ @job = user_jobs.new
23
23
  respond_with(:user, @job)
24
24
  end
25
25
 
26
26
  def create
27
- @job = scope.build(job_params)
27
+ @job = user_jobs.build(job_params)
28
28
  crud_flash @job.save
29
29
  respond_with(:user, @job)
30
30
  end
@@ -41,12 +41,20 @@ module Recruiter
41
41
 
42
42
  private
43
43
 
44
- def scope
44
+ def jobs
45
+ if current_user.admin?
46
+ return Job.all
47
+ end
48
+
49
+ user_jobs
50
+ end
51
+
52
+ def user_jobs
45
53
  current_user.jobs
46
54
  end
47
55
 
48
56
  def set_job
49
- @job = scope.find(params[:id])
57
+ @job = jobs.find(params[:id])
50
58
  end
51
59
 
52
60
  def job_params
@@ -0,0 +1,5 @@
1
+ class AddAdminFlagToUsers < ActiveRecord::Migration
2
+ def change
3
+ add_column :recruiter_users, :admin, :boolean, default: false
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Recruiter
2
- VERSION = "1.1.9"
2
+ VERSION = "1.1.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recruiter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Jacobus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-05 00:00:00.000000000 Z
11
+ date: 2015-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kaminari
@@ -449,6 +449,7 @@ files:
449
449
  - db/migrate/20140618170815_create_recruiter_tags.rb
450
450
  - db/migrate/20140618170904_create_recruiter_jobs_tags.rb
451
451
  - db/migrate/20140712201534_create_recruiter_articles.rb
452
+ - db/migrate/20150815184100_add_admin_flag_to_users.rb
452
453
  - lib/generators/templates/locales/devise.en.yml
453
454
  - lib/generators/templates/locales/devise.pt-BR.yml
454
455
  - lib/generators/templates/locales/en.yml
@@ -483,7 +484,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
483
484
  version: '0'
484
485
  requirements: []
485
486
  rubyforge_project:
486
- rubygems_version: 2.4.6
487
+ rubygems_version: 2.2.2
487
488
  signing_key:
488
489
  specification_version: 4
489
490
  summary: Recruiter is a Rails Engine for adding job posting functionality to a Rails