Skip to content

Commit

Permalink
Fix linters errors
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulhamiid committed Oct 14, 2022
1 parent 264289e commit 43cca4f
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 15 deletions.
32 changes: 32 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"tailwind",
"apply",
"variants",
"responsive",
"screen"
]
}
],
"scss/at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"tailwind",
"apply",
"variants",
"responsive",
"screen"
]
}
],
"csstree/validator": true
},
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css"]
}
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

Expand Down Expand Up @@ -72,9 +74,9 @@ end

gem 'devise'

gem "bootstrap", "~> 5.0"
gem 'bootstrap', '~> 5.0'

gem "bootstrap_form", "~> 5.1"
gem 'bootstrap_form', '~> 5.1'

gem 'jquery-rails'

Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
*= require_self
*/

@import "bootstrap";
@import "rails_bootstrap_forms";
@import "bootstrap";
@import "rails_bootstrap_forms";
2 changes: 1 addition & 1 deletion app/assets/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
body {
width: 65%;
margin: 0 auto;
}
}
20 changes: 10 additions & 10 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
class ApplicationController < ActionController::Base

before_action :authenticate_user!

protect_from_forgery with: :exception
before_action :update_allowed_parameters, if: :devise_controller?

protect_from_forgery with: :exception
before_action :update_allowed_parameters, if: :devise_controller?

protected
protected

def update_allowed_parameters
devise_parameter_sanitizer.permit(:sign_up) { |u| u.permit(:name, :bio, :photo, :email, :password) }
devise_parameter_sanitizer.permit(:account_update) do |u| u.permit(:name, :bio, :photo, :email, :password, :current_password)
end
end
def update_allowed_parameters
devise_parameter_sanitizer.permit(:sign_up) { |u| u.permit(:name, :bio, :photo, :email, :password) }
devise_parameter_sanitizer.permit(:account_update) do |u|
u.permit(:name, :bio, :photo, :email, :password,
:current_password)
end
end
end

0 comments on commit 43cca4f

Please sign in to comment.