forked from hotsh/rstat.us
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: Gemfile.lock models.rb rstatus.rb test/factories.rb test/rstatus_test.rb views/users/show.haml
- Loading branch information
Showing
8 changed files
with
115 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,6 +177,7 @@ DEPENDENCIES | |
haml | ||
i18n | ||
mongo_mapper | ||
nokogiri (= 1.4.4) | ||
omniauth | ||
opub | ||
ostatus | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
Factory.define :feed do |f| | ||
#f.user_name "John Public" | ||
#f.user_username "user_name" | ||
#f.user_email "[email protected]" | ||
#f.user_website "http://example.com" | ||
end | ||
|
||
Factory.sequence :update_text do |i| | ||
|
@@ -23,9 +19,7 @@ | |
|
||
Factory.define :user do |u| | ||
u.username Factory.next(:usernames) | ||
#u.email Factory.next(:emails) | ||
#u.website "http://example.com" | ||
#u.name "Something" | ||
u.author {|a| Factory(:author, :username => a.username) } | ||
end | ||
|
||
Factory.sequence :integer do |i| | ||
|
@@ -37,3 +31,11 @@ | |
a.provider "twitter" | ||
a.association :user | ||
end | ||
|
||
Factory.define :author do |a| | ||
a.username "user" | ||
a.email Factory.next(:emails) | ||
a.website "http://example.com" | ||
a.name "Something" | ||
a.bio "Hi, I do stuff." | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.profile_field{:class => attr} | ||
%label{:for => attr} | ||
#{attr.capitalize}: | ||
%input{:id => attr, :name => attr, :value => @user.author.send(attr)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#profile | ||
%h3= "Profile for #{@user.author.username}" | ||
|
||
%form#profile-update{:action => "/users/#{current_user.author.username}", :method => "POST", :name => "profile_update_form"} | ||
%input{:type => "hidden", :name => "_method", :value => "put"} | ||
|
||
- [:name, :email, :website].each do |attr| | ||
!= haml :"users/_profile_field", :locals => {:attr => attr} | ||
|
||
.bio | ||
%div | ||
%label{:for => "bio"} | ||
Bio: | ||
%div | ||
%textarea#bio{:name => "bio"} | ||
#{@user.author.bio} | ||
|
||
%input#update-button.button{:type => "submit", :value => "Save"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters