Skip to content

Commit

Permalink
Stickler errors fixed in application_controller.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
maelfosso committed Sep 11, 2019
1 parent c7347f6 commit 6987332
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
17 changes: 5 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,38 +52,31 @@ gem 'faker'
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]

gem 'devise'

gem 'omniauth-facebook'

group :development, :test do
gem 'factory_bot_rails'
gem 'rspec-rails'
gem 'shoulda-matchers'
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: %i[mri mingw x64_mingw]

gem 'dotenv-rails', require: 'dotenv/rails-now'

end

group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'web-console', '>= 3.3.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'rubocop'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'

gem 'rubocop'
gem 'web-console', '>= 3.3.0'
end

group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara'
gem 'launchy'
gem 'capybara-webkit'
gem 'selenium-webdriver'
gem 'rspec-collection_matchers'
gem 'database_cleaner'
gem 'launchy'
gem 'rspec-collection_matchers'
gem 'selenium-webdriver'
end
16 changes: 16 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ GEM
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
arel (9.0.0)
ast (2.4.0)
bcrypt (3.1.13)
bindex (0.8.1)
bootsnap (1.4.4)
Expand Down Expand Up @@ -104,6 +105,7 @@ GEM
hashie (3.6.0)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.3)
jbuilder (2.9.1)
activesupport (>= 4.2.0)
jquery-rails (4.3.5)
Expand Down Expand Up @@ -152,6 +154,9 @@ GEM
oauth2 (~> 1.1)
omniauth (~> 1.9)
orm_adapter (0.5.0)
parallel (1.17.0)
parser (2.6.4.0)
ast (~> 2.4.0)
pg (1.1.4)
public_suffix (3.1.1)
puma (3.12.1)
Expand Down Expand Up @@ -182,6 +187,7 @@ GEM
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
rake (12.3.3)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
Expand Down Expand Up @@ -209,6 +215,14 @@ GEM
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.2)
rubocop (0.74.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.6)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
ruby-progressbar (1.10.1)
ruby_dep (1.5.0)
rubyzip (1.2.3)
sass (3.7.4)
Expand Down Expand Up @@ -250,6 +264,7 @@ GEM
thread_safe (~> 0.1)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.6.0)
warden (1.2.8)
rack (>= 2.0.6)
web-console (3.7.0)
Expand Down Expand Up @@ -289,6 +304,7 @@ DEPENDENCIES
rails (~> 5.2.3)
rspec-collection_matchers
rspec-rails
rubocop
sass-rails (~> 5.0)
selenium-webdriver
shoulda-matchers
Expand Down
9 changes: 5 additions & 4 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ class ApplicationController < ActionController::Base
before_action :configure_permitted_parameters, if: :devise_controller?

protected
def configure_permitted_parameters
devise_parameter_sanitizer.permit(:sign_up, keys: [:name, :username, :gender, :date_of_birth, :nationality])
devise_parameter_sanitizer.permit(:account_update, keys: [:name, :username, :gender, :date_of_birth, :nationality])
end

def configure_permitted_parameters
devise_parameter_sanitizer.permit(:sign_up, keys: %I[name username gender date_of_birth nationality])
devise_parameter_sanitizer.permit(:account_update, keys: %I[name username gender date_of_birth nationality])
end
end

0 comments on commit 6987332

Please sign in to comment.