pg_rails 7.0.8.pre.alpha.39 → 7.0.8.pre.alpha.41

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: 3ea9466d068f06c41fe15e315f2d238ed0479645dfb54a3281e508761bb56891
4
- data.tar.gz: 2fc50e466c3e8022c04a239faad5ce80dda256e5ee41b83d8c010a6e722416a3
3
+ metadata.gz: 3d403c93bba96aff99b15c51782370786112e7985992d5cb457d5c217cfd8ef8
4
+ data.tar.gz: 805484f5704ec187fb8eae8e8cf690401e62864c8014498e68dc5ac16aedc6ef
5
5
  SHA512:
6
- metadata.gz: 0af2dd365f7a39c4d2bbba1847419a900f5484e7fde5189babaf3f4ab50b59843c88270a8a9890ae3f03617e1ac46fd1a0de80cd1a0391088edd54f597c07f13
7
- data.tar.gz: 184710630962af26ee129440ba5c47814fdc5728f287be8c20e5da322fabafd91c4fb2a359bded287445b7dddebba854466a40dcca387a326635348a9167c7cb
6
+ metadata.gz: 11cf0c29eb5fcc5be64cfd59a61808eb5378477a14e2c81a70e17fa3c5ec9d3ccbf6332396d046e73b547834668d28f16534be9c57a0e304726b6e6ef7c9fc0a
7
+ data.tar.gz: 1c0b40e8ac272a1d82894e5feb2084ee8b6be59efa9622f35aaf8c2e3583be9f2e19b3940eb5830dfaa920a7d419b0178d05ee6cee9a61414f6eac1dd79f7377
@@ -20,10 +20,6 @@ module PgEngine
20
20
  end
21
21
  end
22
22
 
23
- before_action do
24
- Current.user = current_user
25
- end
26
-
27
23
  protect_from_forgery with: :exception
28
24
 
29
25
  rescue_from PrintHelper::FechaInvalidaError, with: :fecha_invalida
@@ -32,6 +28,10 @@ module PgEngine
32
28
  redirect_to e.url
33
29
  end
34
30
 
31
+ before_action do
32
+ Current.user = current_user
33
+ end
34
+
35
35
  helper_method :dev_user_or_env?
36
36
  def dev_user_or_env?
37
37
  Rails.env.development? || dev_user?
@@ -2,6 +2,13 @@ module SimpleForm
2
2
  module Components
3
3
  module Errors
4
4
  def error_text
5
+ begin
6
+ if object.errors.details[attribute_name].map(&:values).flatten.include? :blank
7
+ return
8
+ end
9
+ rescue StandardError => e
10
+ pg_err e
11
+ end
5
12
  text = has_custom_error? ? options[:error] : errors.reject(&:empty?).send(error_method)
6
13
  return if text.blank?
7
14
 
@@ -46,10 +46,10 @@ es:
46
46
  # prompts:
47
47
  # defaults:
48
48
  # age: 'Select your age'
49
- errors:
50
- messages:
51
- blank: ''
52
- empty: ''
49
+ # errors:
50
+ # messages:
51
+ # blank: ''
52
+ # empty: ''
53
53
  devise:
54
54
  sign_in: ¿Ya tenés una cuenta? Iniciar sesión
55
55
  sign_out: Cerrar sesión
@@ -33,6 +33,7 @@ class Navbar
33
33
  rescue StandardError
34
34
  # FIXME: testear
35
35
  pg_err item
36
+ return []
36
37
  end
37
38
  # rubocop:enable Security/Eval
38
39
  end
@@ -0,0 +1,6 @@
1
+ RSpec.configure do |config|
2
+ config.before(:each) do
3
+ Current.user = nil
4
+ Current.namespace = nil
5
+ end
6
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.39'
4
+ VERSION = '7.0.8-alpha.41'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.8.pre.alpha.39
4
+ version: 7.0.8.pre.alpha.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-21 00:00:00.000000000 Z
11
+ date: 2024-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -1007,6 +1007,7 @@ files:
1007
1007
  - pg_rails/js/index.js
1008
1008
  - pg_rails/lib/pg_rails.rb
1009
1009
  - pg_rails/lib/pg_rails/capybara_support.rb
1010
+ - pg_rails/lib/pg_rails/current_attributes_support.rb
1010
1011
  - pg_rails/lib/pg_rails/dotenv_support.rb
1011
1012
  - pg_rails/lib/pg_rails/vcr_support.rb
1012
1013
  - pg_rails/lib/version.rb