Skip to content

Commit 41b502c

Browse files
committed
Lint: Use symbols for method attributes in views
Strings and symbols can be used interchangeable, but we prefer symbols.
1 parent b3d34d5 commit 41b502c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

app/views/collections/show.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
.col-md-12.mb-4
7575
.actions.btn-group role='group'
7676
- if action_name == 'view_shared'
77-
= button_to t('.button.collaborate'), save_shared_collection_path(@collection), method: 'post', class: 'btn btn-important h-100'
77+
= button_to t('.button.collaborate'), save_shared_collection_path(@collection), method: :post, class: 'btn btn-important h-100'
7878
= link_to t('common.button.back'), user_messages_path(current_user), class: 'btn btn-important'
7979
- else
8080
- if policy(@collection).edit?

app/views/comments/_edit.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= form_for :comment, url: task_comment_path(@task, @comment), method: 'put', remote: true do |f|
1+
= form_for :comment, url: task_comment_path(@task, @comment), method: :put, remote: true do |f|
22
.comment-text
33
.comment-text-input
44
= f.text_field :text, class: 'form-control'

app/views/messages/index.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ br
4545
- if message.attachment.present?
4646
- if message.action_collection_shared?
4747
= link_to t('.button.view'), view_shared_collection_path(message.attachment, user: message.sender), class: 'btn btn-light btn-sm'
48-
= button_to t('.button.save_collection'), save_shared_collection_path(message.attachment), method: 'post', class: 'btn btn-light btn-sm'
48+
= button_to t('.button.save_collection'), save_shared_collection_path(message.attachment), method: :post, class: 'btn btn-light btn-sm'
4949
- if message.action_group_request?
5050
= link_to t('.button.view'), group_path(message.attachment), class: 'btn btn-light btn-sm'
5151
= button_to grant_access_group_path(message.attachment, user: message.sender.id), method: :post, class: 'btn btn-light btn-sm' do

app/views/users/show.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,4 @@
118118
modal_root_attributes: {id: 'notification-modal'},
119119
modal_body_attributes: {id: 'notification-modal-body'},
120120
template: 'users/shared/_notification_modal',
121-
template_variables: {title: t('.delete_modal.title'), confirm_notification_button: {target: user_registration_path, method: 'delete'}}
121+
template_variables: {title: t('.delete_modal.title'), confirm_notification_button: {target: user_registration_path, method: :delete}}

0 commit comments

Comments
 (0)