recruiter 1.1.12 → 1.1.14
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: 7f723a9409d2d83de14c6099d6c42c74df76ec50
|
4
|
+
data.tar.gz: f9552b7b4a7e139cb7f9e053ef5dd7de2d954433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75b0a05c1cf14618e2931bbf216f737ca191ed04804c69450b386a98436540c751694588b893d4bd9b2c5f5d49b97cc9b5aebde69b33eee338d26b777450fc41
|
7
|
+
data.tar.gz: 9564bb9810255d27e4fe4348fb9aa643370cfa131b88d81e80fc6228a76ae46b380b00820a72585a360641a14f9db3f6fff7cb8ba4518f5b65f18db793da5150
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Recruiter
|
2
|
-
class ArticlesController <
|
2
|
+
class ArticlesController < ::RecruiterController
|
3
3
|
respond_to :html, :json
|
4
4
|
|
5
5
|
def index
|
@@ -9,7 +9,9 @@ module Recruiter
|
|
9
9
|
|
10
10
|
def show
|
11
11
|
@article = scope.find(params[:id])
|
12
|
-
|
12
|
+
ensure_canonical_url(@article) do
|
13
|
+
respond_with(@article)
|
14
|
+
end
|
13
15
|
end
|
14
16
|
|
15
17
|
private
|
@@ -3,6 +3,8 @@ class RecruiterController < ApplicationController
|
|
3
3
|
|
4
4
|
layout 'recruiter/application'
|
5
5
|
|
6
|
+
protected
|
7
|
+
|
6
8
|
def page
|
7
9
|
params[:page]
|
8
10
|
end
|
@@ -10,4 +12,15 @@ class RecruiterController < ApplicationController
|
|
10
12
|
def per_page
|
11
13
|
params[:per_page]
|
12
14
|
end
|
15
|
+
|
16
|
+
def ensure_canonical_url(model, &block)
|
17
|
+
canonical_url = url_for(model)
|
18
|
+
|
19
|
+
if canonical_url.to_s == request.original_url.to_s
|
20
|
+
instance_eval(&block)
|
21
|
+
return
|
22
|
+
end
|
23
|
+
|
24
|
+
redirect_to canonical_url
|
25
|
+
end
|
13
26
|
end
|
data/lib/recruiter/version.rb
CHANGED
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.
|
4
|
+
version: 1.1.14
|
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-
|
11
|
+
date: 2015-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kaminari
|