diff --git a/app/views/user_mailer/email.html.erb b/app/views/user_mailer/email.html.erb index 510a82c..13d30d0 100644 --- a/app/views/user_mailer/email.html.erb +++ b/app/views/user_mailer/email.html.erb @@ -4,7 +4,7 @@ -

From: <%= link_to @from_user.name, @from_user %>

+

From: <%= link_to @from_user.name, user_url(@from_user) %>

<%= simple_format @body %>

diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 4b03487..390e06a 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -6,6 +6,7 @@ <%= link_to image_tag('/facebook.png', :class => 'social-icon', :title => "Facebook"), @user.facebook_url, :class => 'social-link' if @user.facebook_url.present? %> <%= link_to image_tag('/github.png', :class => 'social-icon', :title => "Github"), @user.github_url, :class => 'social-link' if @user.github_url.present? %> <%= link_to image_tag('/website.png', :class => 'social-icon', :title => "Website"), @user.website_url, :class => 'social-link' if @user.website_url.present? %> +<%= link_to "Email User", user_compose_email_path(@user), :class => 'btn' %> diff --git a/config/routes.rb b/config/routes.rb index c461947..e9f6d62 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -36,7 +36,7 @@ Dooraccess::Application.routes.draw do match 'users/merge' => 'users#merge_action', :via => :post # Merge action match 'users/inactive' => 'users#inactive' # Inactive users report resources :users do - get 'email' => 'users#compose_email' + get 'email' => 'users#compose_email', :as => "compose_email" post 'email' => 'users#send_email' end match 'users/create' => 'users#create', :via => :post # Use POST users/create instead of POST users to avoid devise conflict