Skip to content

Commit

Permalink
removing 'titleize' for views, as now in model
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasConnolly committed Aug 3, 2023
1 parent 403e801 commit 7038acc
Show file tree
Hide file tree
Showing 12 changed files with 1,450 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class User < ApplicationRecord
validates_format_of :first_name, with: /[a-zA-Z]/
validates :last_name, presence: true
validates_format_of :last_name, with: /[a-zA-Z]/
after_create :set_username
before_save :set_username
validates :email, presence: true, uniqueness: { case_sensitive: false }
after_save :add_profile
after_create :set_default_role, if: :new_record?
Expand Down
2 changes: 1 addition & 1 deletion app/views/comment_mailer/comment_created.text.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Hello <%=@post.user.first_name.titleize%>, <%= @comment.user.username.titleize %> has commented on your post.
Hello <%=@post.user.first_name%>, <%= @comment.user.username %> has commented on your post.

See all the comments here:

Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/mailer/confirmation_instructions.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p>Welcome <%= @user.username.titleize %>!</p>
<p>Welcome <%= @user.username %>!</p>

<p>You can confirm your account through the link below:</p>

Expand Down
2 changes: 1 addition & 1 deletion app/views/donations/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<tbody>
<% @donations.each do |donation| %>
<tr>
<td><%= donation.user.username.titleize %></td>
<td><%= donation.user.username %></td>
<td><%= donation.amount %></td>
<td><%= donation.created_at %></td>

Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="container-fluid">
<div class="navbar-brand ms-4">
<% if current_user %>
<%= current_user.username.titleize %><br>
<%= current_user.username %><br>
<span><h6><%= link_to "Log out", destroy_user_session_path, data: { turbo_method: :delete }, class: "text-white" %>
<%= link_to " | Edit account" , edit_user_registration_path, class: "text-white" %>
<%= link_to " | Update profile" , edit_profile_path(current_user.profile), class: "text-white" %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/members/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


<% @members.each do |m| %>
<p><strong> <%= m.username.titleize %> </strong>,&nbsp;
<p><strong> <%= m.username %> </strong>,&nbsp;
<%= m.membership_id %>, &nbsp;<%= m.email %>, &nbsp;<%= m.birthday %> <small>
<%= link_to 'Edit' , edit_member_path(m) %>
<%= link_to ' | Delete' , member_path(m), data: { turbo_confirm: "Are you sure?" , turbo_method: :delete } %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/opportunities/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<p><strong>When:</strong> <%= @opportunity.when %> </p>
<!-- <p> -->
<!-- <strong>Vestry liaison person</strong> -->
<%#= @opportunity.user.username.titleize %>
<%#= @opportunity.user.username %>
<!-- </p> -->
<% if user_signed_in? && current_user.admin? %>
<%= link_to 'Edit' , edit_opportunity_path(@opportunity) %> |
Expand Down
2 changes: 1 addition & 1 deletion app/views/post_mailer/post_created.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<p> <%= @post.user.username.titleize %> has created a post in <em><strong>Family Ties</strong></em>, our <em>Facebook</em>-like social media for members of St. Paul's. Anyone may read all posts, but only those who are registered and logged in may create posts or make comments. <%= link_to "Click here to see this post", @url %>
<p> <%= @post.user.username %> has created a post in <em><strong>Family Ties</strong></em>, our <em>Facebook</em>-like social media for members of St. Paul's. Anyone may read all posts, but only those who are registered and logged in may create posts or make comments. <%= link_to "Click here to see this post", @url %>
</p>
<p class="mt-3">This message is generated automatically when a post has been created for parishioners. </p>
2 changes: 1 addition & 1 deletion app/views/profiles/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="col-md-4 offset-md-4 col-sm-8 offset-sm-2 text-center">
<h2><%= @profile.user.username.titleize %></h2>
<h2><%= @profile.user. %></h2>
<% if @profile.user.avatar.attached? %>
<%= image_tag @profile.user.avatar, class: "mx-auto d-block" , width: "100%" , height: "auto" %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/story_idea_mailer/story_idea_created.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p> <%= @story_idea.user.username.titleize %> has created a post in <em><strong>Communicators.</strong></em>
<p> <%= @story_idea.user.username %> has created a post in <em><strong>Communicators.</strong></em>

<p> <%= link_to "Click here", @url %> to see it.</p>

2 changes: 1 addition & 1 deletion app/views/story_ideas/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<h3>
<%= link_to story_idea.title, story_idea %>
</h3>
<p>By <%= story_idea.user.username.titleize %>
<p>By <%= story_idea.user.username%>
</p>
<% if story_idea.comments.any? %>
<p><small><em>
Expand Down
1,439 changes: 1,439 additions & 0 deletions log/development.log

Large diffs are not rendered by default.

0 comments on commit 7038acc

Please sign in to comment.