Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

#990 Fixed linkto confirm #992

Merged
merged 4 commits into from
Nov 2, 2014
Merged

#990 Fixed linkto confirm #992

merged 4 commits into from
Nov 2, 2014

Conversation

orenyk
Copy link
Contributor

@orenyk orenyk commented Sep 21, 2014

Resolved #990

@coollog
Copy link
Contributor

coollog commented Sep 23, 2014

I found that a few files have a link_to syntax with "confirm:" not encapsulated in a data dictionary.

Searching 444 files for "confirm: "

C:\Dropbox\School\Yale\stc\reservations\app\views\announcements\index.html.erb:
   18      <td><%= announcement.ends_at.strftime('%m/%d/%Y') %></td>
   19      <td><%= link_to "Edit", edit_announcement_path(announcement), :class => "btn"  %></td>
   20:     <td><%= link_to 'Delete', announcement, method: :delete, data: { confirm: 'Are you sure?' },  :class => "btn btn-danger"  %></td>
   21    </tr>
   22    <% end %>

C:\Dropbox\School\Yale\stc\reservations\app\views\blackouts\_table.html.erb:
   52          <% end %>
   53          <td><%= link_to 'Edit', edit_blackout_path(blackout), class: 'btn' %></td>
   54:         <td><%= link_to 'Delete', blackout, confirm: 'Are you sure?', method: :delete, class: 'btn btn-danger' %></td>
   55        </tr>
   56      <% end %>

C:\Dropbox\School\Yale\stc\reservations\app\views\blackouts\show.html.erb:
   36    <%= link_to 'Edit', edit_blackout_path(@blackout), :class => 'btn' %>
   37    <%= link_to 'View all blackout dates', blackouts_path, :class => 'btn' %>
   38:   <%= link_to 'Delete', @blackout, confirm: 'Are you sure?', method: :delete, class: 'btn btn-danger' %>
   39  <% end %>
   40  

C:\Dropbox\School\Yale\stc\reservations\app\views\reservations\_new_request.html.erb:
   41  
   42    <div class="form-actions">
   43:     <%= f.button :submit, "Submit Request", confirm: "Are you sure? This request is not finalized and will be subject to approval by an administrator. It will not be available for checkout until and unless approved, and the request may be denied for any reason at the sole discretion of the administrator." %>
   44      <%= link_to "Return to Catalog", catalog_path, class: 'btn' %>
   45    </div>

4 matches across 4 files

@orenyk
Copy link
Contributor Author

orenyk commented Oct 30, 2014

I fixed the few missing ones (some of the results come from using the later Ruby hash syntax) and made the spacing consistent. Ready for final review!

@coollog
Copy link
Contributor

coollog commented Nov 2, 2014

Checked all links (except below) and all seem to work. Checked for any files with confirm: not in data: dictionary and none showed up. Good to go!

equipment_model/#/edit, users/#/edit, and categories/#/edit delete leads to error. Filed new issue: #1036

@orenyk
Copy link
Contributor Author

orenyk commented Nov 2, 2014

These links were known to be broken (see #957) and should be removed soon. Merging!

orenyk added a commit that referenced this pull request Nov 2, 2014
@orenyk orenyk merged commit 3196992 into master Nov 2, 2014
@orenyk orenyk deleted the 990_linkconfirm_update branch November 25, 2014 05:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update link_to confirm for Rails 4
2 participants