From 87c205ca601c5b199525f840b077f9f22e3df61f Mon Sep 17 00:00:00 2001 From: riggraz Date: Sat, 24 Aug 2019 20:04:53 +0200 Subject: [PATCH] Apply single quote convention in Ruby code --- .../admin/application_controller.rb | 4 ++-- app/controllers/admin/users_controller.rb | 8 ++++---- app/views/fields/color_field/_form.html.erb | 2 +- app/views/fields/color_field/_index.html.erb | 4 +++- app/views/fields/color_field/_show.html.erb | 4 +++- .../layouts/_boards_menu_section.html.erb | 2 +- app/views/layouts/_header.html.erb | 14 ++++++------- app/views/layouts/application.html.erb | 4 ++-- config/routes.rb | 2 +- spec/factories/boards.rb | 2 +- spec/factories/post_statuses.rb | 2 +- spec/factories/posts.rb | 4 ++-- spec/factories/users.rb | 16 +++++++-------- spec/models/board_spec.rb | 4 ++-- spec/models/post_spec.rb | 12 +++++------ spec/models/post_status_spec.rb | 12 +++++------ spec/models/user_spec.rb | 20 +++++++++---------- 17 files changed, 60 insertions(+), 56 deletions(-) diff --git a/app/controllers/admin/application_controller.rb b/app/controllers/admin/application_controller.rb index 65f65649..c14aa51b 100644 --- a/app/controllers/admin/application_controller.rb +++ b/app/controllers/admin/application_controller.rb @@ -10,13 +10,13 @@ module Admin def authenticate_admin unless user_signed_in? - flash[:alert] = "You must be logged in to access this page." + flash[:alert] = 'You must be logged in to access this page.' redirect_to new_user_session_path return end unless current_user.moderator? || current_user.admin? - flash[:alert] = "You do not have the privilegies to access this page." + flash[:alert] = 'You do not have the privilegies to access this page.' redirect_to root_path return end diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 5f562236..25f55006 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -33,13 +33,13 @@ module Admin def authenticate_admin unless user_signed_in? - flash[:alert] = "You must be logged in to access this page." + flash[:alert] = 'You must be logged in to access this page.' redirect_to new_user_session_path return end unless current_user.admin? - flash[:alert] = "You do not have the privilegies to access this page." + flash[:alert] = 'You do not have the privilegies to access this page.' redirect_to root_path return end @@ -51,7 +51,7 @@ module Admin user.skip_confirmation! # automatically confirm user email if user.save - flash[:notice] = translate_with_resource("create.success") + flash[:notice] = translate_with_resource('create.success') redirect_to admin_user_path(user) else render :new, locals: { @@ -73,7 +73,7 @@ module Admin user.skip_reconfirmation! # automatically reconfirm user email if user.save - flash[:notice] = translate_with_resource("update.success") + flash[:notice] = translate_with_resource('update.success') redirect_to admin_user_path(user) else render :new, locals: { diff --git a/app/views/fields/color_field/_form.html.erb b/app/views/fields/color_field/_form.html.erb index b0955f5b..a8cfadbc 100644 --- a/app/views/fields/color_field/_form.html.erb +++ b/app/views/fields/color_field/_form.html.erb @@ -2,5 +2,5 @@ <%= f.label field.attribute %>
- <%= f.color_field field.attribute, style: "height: 40px" %> + <%= f.color_field field.attribute, style: 'height: 40px;' %>
diff --git a/app/views/fields/color_field/_index.html.erb b/app/views/fields/color_field/_index.html.erb index 01c73697..986637f7 100644 --- a/app/views/fields/color_field/_index.html.erb +++ b/app/views/fields/color_field/_index.html.erb @@ -1 +1,3 @@ -
+
+
diff --git a/app/views/fields/color_field/_show.html.erb b/app/views/fields/color_field/_show.html.erb index 00d85674..50a791a3 100644 --- a/app/views/fields/color_field/_show.html.erb +++ b/app/views/fields/color_field/_show.html.erb @@ -1,2 +1,4 @@ -
+
+
(<%= field.to_s %>) \ No newline at end of file diff --git a/app/views/layouts/_boards_menu_section.html.erb b/app/views/layouts/_boards_menu_section.html.erb index abae5c41..1d4423f2 100644 --- a/app/views/layouts/_boards_menu_section.html.erb +++ b/app/views/layouts/_boards_menu_section.html.erb @@ -1,5 +1,5 @@ <% boards.each do |board| %> <% end %> \ No newline at end of file diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index b27ae583..ec2bf40d 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -1,35 +1,35 @@