pg_rails 7.6.21.pre.10 → 7.6.21.pre.11

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: 61d8d262ef0d2d85da44e8c6580a6e52b07edf7e42ebd67043b2fab25a353734
4
- data.tar.gz: 789617b6cd87d217773dde9556485e3352e1209c28f9ca3458544c251873bb84
3
+ metadata.gz: f442d786ae4cf36b38c87e72307bb1fe1dfd4c77fb2e697566adfb1d48bbb1b6
4
+ data.tar.gz: d1028638b9acd8817adbc33a0680f270c46b96c1b9f96d66d6ac964d46b96eaf
5
5
  SHA512:
6
- metadata.gz: 6cc7e58e50a5a168d317afda86b9cd7e024b990fef11469574b49ea42568729854baa2658f7d3d0da058fac667db93e2d35805d0d19fd0a92ae9f88a5a5479cb
7
- data.tar.gz: d0ab03c2862046efbde505013c57296032b7d1ccd21d6daa08cd7b5b31288de68bb548b1b81c0b1c918cba906bbed986af30ddaf25212fc33fb40b728b626889
6
+ metadata.gz: 184210806bdd1ed1c9c4e4e6f2e4d481751cae4375f1cf5df01b74b66ff66bc685e8cb01ad5405ad63e6e147c9eebf68a5795851040612ee1c830d4f9acc2261
7
+ data.tar.gz: 44544f1fd6549dc40ca21b0666a500538567320bbb6170e29ffc0a1773ae31e8c2c5a9faf869137465dce6c12f29a8a42d765d4d00dd3cf9e34f4f852f2f9821
@@ -138,6 +138,10 @@ class User < ApplicationRecord
138
138
  "#{nombre} #{apellido}"
139
139
  end
140
140
 
141
+ def first_first_name
142
+ nombre.strip.split.first.presence || to_s
143
+ end
144
+
141
145
  class Error < PgEngine::Error; end
142
146
 
143
147
  # def default_account
@@ -82,7 +82,7 @@ module PgEngine
82
82
  end
83
83
 
84
84
  def puede_editar?
85
- user_has_profile?(:update)
85
+ user_has_profile?(:update) || (record.respond_to?(:creado_por) && record.creado_por == user)
86
86
  end
87
87
 
88
88
  def puede_crear?
@@ -100,7 +100,7 @@ es:
100
100
  sign_up: Crear una cuenta
101
101
  invitations:
102
102
  send_instructions: "Se envió una invitación a %{email}"
103
- invitation_token_invalid: "¡La invitación no es válida!"
103
+ invitation_token_invalid: "La invitación expiró :("
104
104
  updated: ""
105
105
  updated_not_active: ""
106
106
  no_invitations_remaining: "No quedan invitaciones"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.6.21-10'
4
+ VERSION = '7.6.21-11'
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.10
4
+ version: 7.6.21.pre.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso