chaltron 0.2.9 → 0.2.10

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: 9fd433d9e8e478f9be969213caf0b0f4ccf0916e0b9e1b42020b71401bfcc6ba
4
- data.tar.gz: 5665da77fb1de3825bcf78404e71ecc11d99fd51c91e8a4438995142118c718a
3
+ metadata.gz: 1088efaf7dac2e7cadc264670bca21620d96fcd47bb5be4af129a4bbb32e215b
4
+ data.tar.gz: de8b6c6c2c2a7bcc3da89572002cd745897542894f244ba74dea8a23ccc798bc
5
5
  SHA512:
6
- metadata.gz: 188ef1ce8f400985c7982b926be8cb8dcf1f3174a86db9671c75f480031860ce892ecc0fb922782f7d6e2d6eac6a6a9371a3085474a77a2a6f8341cbed30bc77
7
- data.tar.gz: 18a83686f2ecc8d8b4e4bc5849c5ae54e82eee1307a729d88a0b688d93aeb11fab1882022214257b11a80c5802da312ecc0d960f404ebb81fab9979e61ab4e41
6
+ metadata.gz: 752d8e05f29bce3fa305f6e3c92cbb36b0924d4d015cc68c19d776d91f1cf4bde407f3c7e2511099622a57a8b83e8796448a8dde63d4d473d16b722b66ff2590
7
+ data.tar.gz: 340c64ad0fef532e38d1081ce37ab4c1dc1228316f9e282b203839d2d089765927c2ae9aee86936e23d977e73d53234cdab61e0b2c036953f10c9881b4f6cb66
@@ -81,7 +81,9 @@ class Chaltron::UsersController < ApplicationController
81
81
  end
82
82
 
83
83
  def self_update_params
84
- params.require(:user).permit(:email, :fullname)
84
+ allowed = [:fullname]
85
+ allowed << :email if current_user.provider.nil?
86
+ params.require(:user).permit(allowed)
85
87
  end
86
88
 
87
89
  def filter_params
@@ -4,13 +4,15 @@
4
4
  <%= bootstrap_form_for(current_user, as: :user, url: self_update_users_path,
5
5
  layout: :horizontal) do |f| %>
6
6
  <%= f.text_field :fullname %>
7
- <%= f.email_field :email %>
8
7
  <% if current_user.provider.nil? %>
8
+ <%= f.email_field :email %>
9
9
  <fieldset>
10
10
  <legend>Password</legend>
11
11
  <%= f.password_field :password %>
12
12
  <%= f.password_field :password_confirmation %>
13
13
  </fieldset>
14
+ <% else %>
15
+ <%= f.email_field :email, disabled: true %>
14
16
  <% end %>
15
17
  <%= f.form_group class: 'form-actions' do %>
16
18
  <%= f.submit t('.submit'), class: 'btn btn-primary' %>
@@ -1,3 +1,3 @@
1
1
  module Chaltron
2
- VERSION = '0.2.9'.freeze
2
+ VERSION = '0.2.10'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chaltron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - vicvega
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-27 00:00:00.000000000 Z
11
+ date: 2018-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails