egov_utils 0.4.2 → 0.4.3

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
  SHA256:
3
- metadata.gz: 28bcac8b22dc1ac24bf8f6d2020c38543b3cf0a72d45a3cb1d2e010e0340cb27
4
- data.tar.gz: bc1069c0ac07373700ef55ee890540d8ea59817ff9dc22a6eb8c2cbba7c973b6
3
+ metadata.gz: 5d19dfb5ded6ef5314f9dc4d673c4908c771da7694ecde5b7af5356cb5d5105f
4
+ data.tar.gz: 36f1ddf142197cce18d9634c9624dc2cd8b5653fcef52768928a81d2775f71b6
5
5
  SHA512:
6
- metadata.gz: af95472e39fbfd83b19cadebb337dd4e2f42106a90b1ace210b897a31f09dd83ccd5f92da7c66e8c77434f4a72ed8718fcbd47f55a73b30e7de7dcfe4619e520
7
- data.tar.gz: 30cc745213efb8a6228503ef0530725fdd4221e5cc07923ff19228c0efb644cfae3c632f936203350bbf3c9872c0734ddb7ce13f6bcaf8fc766f8c39a9fc8283
6
+ metadata.gz: 06b49804aa5249f4f82565013610589fe2da31479461a7e669f48e57088d43186bd6a014042c6289cff2128eb53f6f44a12a80897158ed99342bdd5953346e83
7
+ data.tar.gz: 161ace127236cb20a45a5fd6600c18b15fd52548c26ddb96ec1e60782fddb9ffc209267cd93194d5531f3061741f28ebf0201047a55ef8ff56fce239ed0a1679
@@ -6,7 +6,7 @@ module EgovUtils
6
6
 
7
7
  skip_before_action :require_login, only: [:new, :create, :confirm]
8
8
 
9
- load_and_authorize_resource
9
+ load_and_authorize_resource only: [:index, :new, :create, :show, :destroy]
10
10
 
11
11
  def index
12
12
  providers
@@ -53,7 +53,7 @@ module EgovUtils
53
53
 
54
54
  def approve
55
55
  @user = User.find_by(id: params[:id])
56
- render_404 and return unless @user || @user.active?
56
+ render_404 and return if @user.nil? || @user.active?
57
57
  authorize!(:manage, User)
58
58
  @user.update(active: true)
59
59
  redirect_back(fallback_location: @user)
@@ -61,7 +61,7 @@ module EgovUtils
61
61
 
62
62
  def confirm
63
63
  @user = User.find_by(confirmation_code: params[:id])
64
- render_404 and return if @user.nil? || !@user.active? || @user.updated_at < (Time.now - 24.hours)
64
+ render_404 and return if @user.nil? || @user.active? || @user.updated_at < (Time.now - 24.hours)
65
65
  @user.update(active: true)
66
66
  logged_user = @user
67
67
  flash[:notice] = t('success_user_confirm')
@@ -56,7 +56,6 @@ module EgovUtils
56
56
  format.html { render template: "errors/error_404", error: exception.try('message'), status: 404 }
57
57
  format.js { head :not_found, content_type: 'text/html' }
58
58
  end
59
- return false
60
59
  end
61
60
 
62
61
  def editable_attributes(model, action=:update)
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '0.4.2'
2
+ VERSION = '0.4.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egov_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr