chaltron 1.0.8 → 1.0.9

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: b850937bcef4e17eef3dc52aa62580be403615bce5d60e7a9ec0fe3efca3e24b
4
- data.tar.gz: 71d9717f0725bc65b9a958be84e9ed7d33a2b9ca23919eed794d3bd3d504c099
3
+ metadata.gz: 180ada0db44d9f2a5384a089fea71ebf041948c9afa0af11e4ebf12923644087
4
+ data.tar.gz: 502a304645ae67a57bdfbd64d67115fedc03e8c5f05e00e70f89151aee3e6616
5
5
  SHA512:
6
- metadata.gz: 3e7d58edb04fef14145ab7bbf246234e1e84ec59010edfead4c02f6e8e26ac8459966d46a1f1b04c5774bc988c2de636ed6560b353d7340faeed460317a1e456
7
- data.tar.gz: 32c2f00edd955fa6f7ee4b1637f6c0a812fbcc49d78e90c0003823dde7680dfb6302e670f47c4ad02444a33d66468352aa69877981c50b13422cb93916ecec9b
6
+ metadata.gz: 3a840d9d3c62ae6e3c4318c1015afbef4522c90d0039ac6f17efc2e569135c71e967cf753f20425871871713ae4bb0f2161371e176cb304a09db5b892e03c712
7
+ data.tar.gz: b6eaf2592cc963af47967b57a1d2853a218ead28d202e762d8522f4703cf0f0e79e37e5c3d7aaba4c41a645a2d79576ff403a9d60b4f0db591762e680db6edac
@@ -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
@@ -6,13 +6,15 @@
6
6
  <%= bootstrap_form_for(current_user, as: :user, url: self_update_users_path,
7
7
  layout: :horizontal, label_col: 'col-sm-2', control_col: 'col-sm-10') do |f| %>
8
8
  <%= f.text_field :fullname %>
9
- <%= f.email_field :email %>
10
9
  <% if current_user.provider.nil? %>
10
+ <%= f.email_field :email %>
11
11
  <fieldset>
12
12
  <legend>Password</legend>
13
13
  <%= f.password_field :password %>
14
14
  <%= f.password_field :password_confirmation %>
15
15
  </fieldset>
16
+ <% else %>
17
+ <%= f.email_field :email, disabled: true %>
16
18
  <% end %>
17
19
 
18
20
  <div class='form-group row'>
@@ -1,3 +1,3 @@
1
1
  module Chaltron
2
- VERSION = '1.0.8'.freeze
2
+ VERSION = '1.0.9'.freeze
3
3
  end
@@ -15,15 +15,6 @@ module Chaltron
15
15
  end
16
16
  end
17
17
 
18
- def gemfile
19
- gem 'bootstrap_form',
20
- git: 'https://github.com/bootstrap-ruby/rails-bootstrap-forms.git',
21
- branch: 'master'
22
- Bundler.with_clean_env do
23
- run 'bundle install'
24
- end
25
- end
26
-
27
18
  def db_migrations
28
19
  rake 'chaltron_engine:install:migrations'
29
20
  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: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - vicvega
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-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