Skip to content

Commit d02dc89

Browse files
author
Mike Firesheets
committed
I forgot where I was with this tutorial
1 parent a7f50a4 commit d02dc89

File tree

5 files changed

+50
-2
lines changed

5 files changed

+50
-2
lines changed

app/assets/stylesheets/users.css.scss

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
// Place all the styles related to the Users controller here.
22
// They will automatically be included in application.css.
33
// You can use Sass (SCSS) here: http://sass-lang.com/
4+
.gravatar-edit {
5+
margin-bottom: 1rem;
6+
}

app/views/users/_form.html.erb

+9-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<%= f.label :email, class: 'prefix' %>
3434
</div>
3535
<div class="small-9 end columns">
36-
<%= f.text_field :email %>
36+
<%= f.email_field :email, required: true %>
3737
<small class="error">A valid email address is required.</small>
3838
</div>
3939
</div>
@@ -60,6 +60,14 @@
6060
</div>
6161
</div>
6262
</div>
63+
<div class="row">
64+
<div class="small-3 text-right columns gravatar-edit">
65+
<%= gravatar_for @user %>
66+
</div>
67+
<div class="small-9 columns">
68+
<a href="http://gravatar.com/emails" target=_blank>change</a>
69+
</div>
70+
</div>
6371
<div class="row">
6472
<div class="small-12 columns">
6573
<%= f.submit class: 'button small' %>

test/fixtures/tournaments.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
feb:
2+
name: President's Foos-vitational
3+
date: 2015-02-15
4+
teams: 4
5+
6+
aug:
7+
name: Foos-a-palooza
8+
date: 2015-08-15
9+
teams: 8
10+
11+
oct:
12+
name: Foos-tober Fest
13+
date: 2015-10-15
14+
teams: 4
15+
16+
Dec:
17+
name: Holiday Foos-meister
18+
date: 2015-12-15
19+
teams: 8

test/integration/users_edit_test.rb

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
require 'test_helper'
2+
3+
class UsersEditTest < ActionDispatch::IntegrationTest
4+
5+
def setup
6+
@user = users(:test)
7+
end
8+
9+
test "unsuccessful edit" do
10+
get edit_user_path(@user)
11+
assert_template 'users/edit'
12+
patch user_path(@user), user: { first: "",
13+
email: "foo@invalid",
14+
password: "foo",
15+
password_confirmation: "bar" }
16+
assert_template 'users/edit'
17+
end
18+
end

vendor/assets/stylesheets/foundation_and_overrides.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ $include-html-global-classes: $include-html-classes;
140140
// $last-child-float: $opposite-direction;
141141

142142
// We use these to make sure border radius matches unless we want it different.
143-
$global-radius: 8px;
143+
// $global-radius: 3px;
144144
// $global-rounded: 1000px;
145145

146146
// We use these to control inset shadow shiny edges and depressions.

0 commit comments

Comments
 (0)