def signup_confirm(user, token)
with_recipient_locale user do
- @url = url_for(:controller => "users", :action => "confirm",
+ @url = url_for(:controller => "confirmations", :action => "confirm",
:display_name => user.display_name,
:confirm_string => token.token)
def email_confirm(user, token)
with_recipient_locale user do
@address = user.new_email
- @url = url_for(:controller => "users", :action => "confirm_email",
+ @url = url_for(:controller => "confirmations", :action => "confirm_email",
:confirm_string => token.token)
mail :to => user.new_email,
def note_comment_notification(comment, recipient)
with_recipient_locale recipient do
- @noteurl = browse_note_url(comment.note)
+ @noteurl = note_url(comment.note)
@place = Nominatim.describe_location(comment.note.lat, comment.note.lon, 14, I18n.locale)
@comment = comment.body
@owner = recipient == comment.note.author
end
def attach_project_logo
- attachments.inline["logo.png"] = File.read(Rails.root.join("app/assets/images/osm_logo_30.png"))
+ attachments.inline["logo.png"] = Rails.root.join("app/assets/images/osm_logo_30.png").read
end
def attach_user_avatar(user)
avatar = user&.avatar
if avatar&.attached?
if avatar.variable?
- image = avatar.variant(:resize => "50x50>").processed
- image.service.download(image.key)
+ avatar.variant(:resize_to_limit => [50, 50]).download
else
avatar.blob.download
end
else
- File.read(Rails.root.join("app/assets/images/avatar_small.png"))
+ Rails.root.join("app/assets/images/avatar_small.png").read
end
end