Skip to content
Snippets Groups Projects
Commit 6ef20926 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Add location to user profile

parent 476199e0
No related branches found
No related tags found
No related merge requests found
Loading
@@ -9,6 +9,7 @@ v 7.10.0 (unreleased)
Loading
@@ -9,6 +9,7 @@ v 7.10.0 (unreleased)
- Improve diff UI - Improve diff UI
- Fix alignment of navbar toggle button (Cody Mize) - Fix alignment of navbar toggle button (Cody Mize)
- Identical look of selectboxes in UI - Identical look of selectboxes in UI
- Add location field to user profile
   
v 7.9.0 (unreleased) v 7.9.0 (unreleased)
- Add HipChat integration documentation (Stan Hu) - Add HipChat integration documentation (Stan Hu)
Loading
Loading
Loading
@@ -68,7 +68,7 @@ class ProfilesController < ApplicationController
Loading
@@ -68,7 +68,7 @@ class ProfilesController < ApplicationController
params.require(:user).permit( params.require(:user).permit(
:email, :password, :password_confirmation, :bio, :name, :username, :email, :password, :password_confirmation, :bio, :name, :username,
:skype, :linkedin, :twitter, :website_url, :color_scheme_id, :theme_id, :skype, :linkedin, :twitter, :website_url, :color_scheme_id, :theme_id,
:avatar, :hide_no_ssh_key, :hide_no_password :avatar, :hide_no_ssh_key, :hide_no_password, :location
) )
end end
end end
Loading
@@ -53,6 +53,9 @@
Loading
@@ -53,6 +53,9 @@
.form-group .form-group
= f.label :website_url, 'Website', class: "control-label" = f.label :website_url, 'Website', class: "control-label"
.col-sm-10= f.text_field :website_url, class: "form-control" .col-sm-10= f.text_field :website_url, class: "form-control"
.form-group
= f.label :location, 'Location', class: "control-label"
.col-sm-10= f.text_field :location, class: "form-control"
.form-group .form-group
= f.label :bio, class: "control-label" = f.label :bio, class: "control-label"
.col-sm-10 .col-sm-10
Loading
Loading
class AddLocationToUser < ActiveRecord::Migration
def change
add_column :users, :location, :string
end
end
Loading
@@ -11,7 +11,7 @@
Loading
@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
   
ActiveRecord::Schema.define(version: 20150313012111) do ActiveRecord::Schema.define(version: 20150320234437) do
   
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
Loading
@@ -473,6 +473,7 @@ ActiveRecord::Schema.define(version: 20150313012111) do
Loading
@@ -473,6 +473,7 @@ ActiveRecord::Schema.define(version: 20150313012111) do
t.boolean "password_automatically_set", default: false t.boolean "password_automatically_set", default: false
t.string "bitbucket_access_token" t.string "bitbucket_access_token"
t.string "bitbucket_access_token_secret" t.string "bitbucket_access_token_secret"
t.string "location"
end end
   
add_index "users", ["admin"], name: "index_users_on_admin", using: :btree add_index "users", ["admin"], name: "index_users_on_admin", using: :btree
Loading
Loading
Loading
@@ -11,6 +11,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
Loading
@@ -11,6 +11,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
fill_in "user_linkedin", with: "testlinkedin" fill_in "user_linkedin", with: "testlinkedin"
fill_in "user_twitter", with: "testtwitter" fill_in "user_twitter", with: "testtwitter"
fill_in "user_website_url", with: "testurl" fill_in "user_website_url", with: "testurl"
fill_in "user_location", with: "Ukraine"
click_button "Save changes" click_button "Save changes"
@user.reload @user.reload
end end
Loading
@@ -20,6 +21,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
Loading
@@ -20,6 +21,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
@user.linkedin.should == 'testlinkedin' @user.linkedin.should == 'testlinkedin'
@user.twitter.should == 'testtwitter' @user.twitter.should == 'testtwitter'
@user.website_url.should == 'testurl' @user.website_url.should == 'testurl'
find("#user_location").value.should == "Ukraine"
end end
   
step 'I change my avatar' do step 'I change my avatar' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment