pg_rails 7.6.21.pre.1 → 7.6.21.pre.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3eab12e3524597cafecf025ff2f374fc8d4e6f263322889fa43f47d8053ce55
4
- data.tar.gz: 6f8a4178b6e30326d9d661371273fb0da7c232f413db0de7fd9d715bade85e11
3
+ metadata.gz: 6698336321ce3bb886aa1de70219bab209e2f8b2f1b3f867282a29f1f1ebf5a5
4
+ data.tar.gz: fae76eef1209ba3e463740c8818ebd406a0b387eab151d964519fe0f5a389cec
5
5
  SHA512:
6
- metadata.gz: 1d8f9670e42068df07b4d3e770f412cae71d4477870986067bf95c025b9ab8879590ef688cf07090054e0d1499b8484ac6899f5a30ca9763a1d032aa4e1e9b04
7
- data.tar.gz: 78cce58eb9e2da9ac61d2cd469e85e98742e583e4bf3ffc9aea145b9e000cb4101734e9f51acb49813b70826ff6286fce475ce64feb339606deb74f5e9072bc9
6
+ metadata.gz: 55b7bc4417466c09110d4e48c4ee7355fdfc7bcf8e153592f9e0418fe518803953b73a6c3584274992aa3624cf6073b0ddab327e9971d7bb17923fbd176322ed
7
+ data.tar.gz: c51ce96d9af18a24111adc2130ae196290df313198561b4d6b23f59447b6d5d7762c5907bb1bcac59c7aabfbfc439b75324e06901d48de98181462b95c7e4582
@@ -3,6 +3,14 @@ class Current < ActiveSupport::CurrentAttributes
3
3
  # attribute :request_id, :user_agent, :ip_address
4
4
 
5
5
  # resets { Time.zone = nil }
6
+ def active_user_account
7
+ # Para los jobs
8
+ if attributes[:active_user_account].nil? && user.present? && account.present?
9
+ attributes[:active_user_account] = user.active_user_account_for(account)
10
+ end
11
+
12
+ super
13
+ end
6
14
 
7
15
  def tid
8
16
  active_user_account.to_param
@@ -132,12 +132,12 @@ class User < ApplicationRecord
132
132
 
133
133
  class Error < PgEngine::Error; end
134
134
 
135
- def default_account
136
- raise Error, 'El usuario debe tener cuenta' if accounts.empty?
135
+ # def default_account
136
+ # raise Error, 'El usuario debe tener cuenta' if accounts.empty?
137
137
 
138
- user_accounts.first.account
139
- # throw :warden, scope: :user, message: :user_not_belongs_to_account
140
- end
138
+ # user_accounts.first.account
139
+ # # throw :warden, scope: :user, message: :user_not_belongs_to_account
140
+ # end
141
141
 
142
142
  deprecate :current_account, deprecator: PgEngine.deprecator
143
143
 
@@ -13,4 +13,4 @@ rené = FactoryBot.create(:user, email: 'rene@bien.com', nombre: 'René', apelli
13
13
  confirmed_at: Time.now)
14
14
 
15
15
  racionalismo.user_accounts.create!(user: baruch, profiles: [:account__owner])
16
- racionalismo.user_accounts.create!(user: rené, profiles: [:cosas__read])
16
+ racionalismo.user_accounts.create!(user: rené, profiles: [])
@@ -51,6 +51,7 @@ html
51
51
  }
52
52
 
53
53
  body
54
+ span#tid.d-none data-tid="#{Current.tid}"
54
55
  - sidebar_present = @navbar.present? && @sidebar != false
55
56
  - if sidebar_present
56
57
  = render partial: 'pg_layout/sidebar_mobile'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.6.21.pre.1'
4
+ VERSION = '7.6.21.pre.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.6.21.pre.1
4
+ version: 7.6.21.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso