diff --git a/app/controllers/answers_controller.rb b/app/controllers/answers_controller.rb index a6fe02a..550c56f 100644 --- a/app/controllers/answers_controller.rb +++ b/app/controllers/answers_controller.rb @@ -30,7 +30,7 @@ @lock_version = @answer.lock_version # Someone else already added an answer while the user was working - elsif ans_params[:id].nil? || ans_params[:id].empty? + elsif ans_params[:id].blank? @old_answer = Marshal::load(Marshal.dump(@answer)) @answer.text = params["answer-text-#{@answer.question_id}".to_sym] authorize @answer diff --git a/app/views/user_mailer/api_token_granted_notification.html.erb b/app/views/user_mailer/api_token_granted_notification.html.erb index bf752fd..7b8fda1 100644 --- a/app/views/user_mailer/api_token_granted_notification.html.erb +++ b/app/views/user_mailer/api_token_granted_notification.html.erb @@ -1,7 +1,7 @@ <% FastGettext.with_locale FastGettext.default_locale do %> -
<% _('Hello') %> <%= @user.name %>
+<% _('Hello ') %><%= @user.name %>
- <% _('You have been granted permission by your organisation to use our API.') %>" <%= link_to _('Your API token and instructions for using the API endpoints can be found here.'), controller: "users", action: "edit" %>". + <% _('You have been granted permission by your organisation to use our API. ') %>"<%= link_to _('Your API token and instructions for using the API endpoints can be found here.'), controller: "users", action: "edit" %>".
<% end %> \ No newline at end of file diff --git a/app/views/user_mailer/permissions_change_notification.html.erb b/app/views/user_mailer/permissions_change_notification.html.erb index a0ef8fe..e7b1dcb 100644 --- a/app/views/user_mailer/permissions_change_notification.html.erb +++ b/app/views/user_mailer/permissions_change_notification.html.erb @@ -1,5 +1,5 @@ <% FastGettext.with_locale FastGettext.default_locale do %> -<%= _('Hello') %> <%= @role.user.name %>
+<%= _('Hello ') %> <%= @role.user.name %>
<% access_level = "read-only" @@ -11,5 +11,5 @@ end %> -<%= _('Your permissions relating to') %> "<%= link_to @role.plan.title, url_for(action: 'show', controller: 'plans', id: @role.plan.id, locale: I18n.default_locale) %>" <%= _('have changed. You now have') %> <%= access_level %> <%= _('access.') %>
+<%= _('Your permissions relating to ') %>"<%= link_to @role.plan.title, url_for(action: 'show', controller: 'plans', id: @role.plan.id, locale: I18n.default_locale) %>"<%= _(' have changed. You now have ') %><%= access_level %><%= _(' access.') %>
<% end %> \ No newline at end of file diff --git a/app/views/user_mailer/project_access_removed_notification.html.erb b/app/views/user_mailer/project_access_removed_notification.html.erb index 7ad6e31..4656bc5 100644 --- a/app/views/user_mailer/project_access_removed_notification.html.erb +++ b/app/views/user_mailer/project_access_removed_notification.html.erb @@ -1,5 +1,5 @@ <% FastGettext.with_locale FastGettext.default_locale do %> -<%= _('Hello') %> <%= @user.name %>
+<%= _('Hello ') %> <%= @user.name %>
-<%= _('Your access to') %> "<%= @plan.title %>" <%= _('has been removed.') %>
+<%= _('Your access to ') %>"<%= @plan.title %>"<%= _(' has been removed.') %>
<% end %> \ No newline at end of file