diff options
author | Francis Irving <francis@mysociety.org> | 2010-07-14 12:33:21 +0100 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-07-14 12:33:21 +0100 |
commit | 3975bcbd9c1c23467a6657f9c8741f49b17e9cc1 (patch) | |
tree | eee38ea4a31a056b39e57b7da33c2f7f2f63e59e | |
parent | 2bb33debfb2ada973215f4be7c829ef8a17eb13c (diff) |
Rename action to say it is setting photo
-rw-r--r-- | app/controllers/user_controller.rb | 2 | ||||
-rw-r--r-- | app/views/user/set_profile_photo.rhtml (renamed from app/views/user/profile_photo.rhtml) | 6 | ||||
-rw-r--r-- | app/views/user/show.rhtml | 2 | ||||
-rw-r--r-- | config/routes.rb | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index b3f9511b5..277d0cd73 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -342,7 +342,7 @@ class UserController < ApplicationController }.flatten.sort { |a,b| b[:model].created_at <=> a[:model].created_at }.first(20) end - def profile_photo + def set_profile_photo # check they are logged in (the upload photo option is anyway only available when logged in) if authenticated_user.nil? flash[:error] = "You need to be logged in to change your profile photo." diff --git a/app/views/user/profile_photo.rhtml b/app/views/user/set_profile_photo.rhtml index b3daafd4c..67647b260 100644 --- a/app/views/user/profile_photo.rhtml +++ b/app/views/user/set_profile_photo.rhtml @@ -4,11 +4,11 @@ <h2>Change your profile photo</h2> -<%= foi_error_messages_for :profile_photo %> +<%= foi_error_messages_for :set_profile_photo %> -<div id="profile_photo"> +<div id="set_profile_photo"> -<% form_tag 'profile_photo', :id => 'profile_photo_form', :multipart => true do %> +<% form_tag 'set_profile_photo', :id => 'set_profile_photo_form', :multipart => true do %> <p> <label class="form_label" for="file_1">Photo of you:</label> <%= file_field_tag :file, :size => 35, :id => 'file_1' %> diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml index 47a012f0f..daee89eaa 100644 --- a/app/views/user/show.rhtml +++ b/app/views/user/show.rhtml @@ -52,7 +52,7 @@ (just to see how it works) <br><%= link_to "Change your password", signchangepassword_url() %> | <%= link_to "Change your email", signchangeemail_url() %> | - <%= link_to "Set profile photo", profile_photo_url() %> + <%= link_to "Set profile photo", set_profile_photo_url() %> <% end %> </p> diff --git a/config/routes.rb b/config/routes.rb index 65858f9df..5b10a1fae 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -62,7 +62,7 @@ ActionController::Routing::Routes.draw do |map| user.show_user '/user/:url_name', :action => 'show' user.contact_user '/user/contact/:id', :action => 'contact' user.river '/river', :action => 'river' - user.profile_photo '/profile_photo', :action => 'profile_photo' + user.set_profile_photo '/set_profile_photo', :action => 'set_profile_photo' end map.with_options :controller => 'public_body' do |body| |