Skip to content

Commit

Permalink
Adds sign up link to home page
Browse files Browse the repository at this point in the history
  • Loading branch information
klanning committed Apr 13, 2012
1 parent 8c15084 commit 99d020e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/views/devise/menu/_login_items.html.erb
Expand Up @@ -4,7 +4,7 @@
</li>
<% else %>
<li>
<div id = "sign_in"><%= button_to('Sign In', new_user_session_path) %> </div>
<div id = "sign_up"><%= button_to('Sign Up', new_user_registration_path) %> </div>
<div id = "sign_in"><%= link_to('Sign In', new_user_session_path) %> </div>
<div id = "sign_up"><%= link_to('Sign Up', new_user_registration_path) %></div>
</li>
<% end %>
6 changes: 1 addition & 5 deletions config/routes.rb
Expand Up @@ -21,11 +21,7 @@
match 'events/:id/volunteer', :to => 'events#volunteer', :as => :volunteer
match 'events/:id/unvolunteer', :to => 'events#unvolunteer', :as => :unvolunteer

match 'volunteer/search', :to => 'volunteerrsvps#index', :as => :volunteersearch

devise_scope :user do
match "/users/sign_up", :to => "devise/registrations#new"
end
match 'volunteer/search', :to => 'volunteerrsvps#index', :as => :volunteersearch

# Sample resource route (maps HTTP verbs to controller actions automatically):
# resources :products
Expand Down
12 changes: 6 additions & 6 deletions spec/requests/users_spec.rb
Expand Up @@ -7,14 +7,14 @@
@user.confirm!
end

it "should see sign in button on the home page" do
it "should see sign in link on the home page" do
visit '/'
page.should have_button("Sign In")
page.should have_link("Sign In")
end

it "should be able to sign in from the home page" do
visit '/'
click_button("Sign In")
click_link("Sign In")
current_path.should == new_user_session_path
end

Expand All @@ -29,14 +29,14 @@
page.should have_link("Sign Out")
end

it "should see sign up button on the home page" do
it "should see sign up link on the home page" do
visit '/'
page.should have_button("Sign Up")
page.should have_link("Sign Up")
end

it "should be able to sign up from the home page" do
visit '/'
click_button("Sign Up")
click_link("Sign Up")
current_path.should == new_user_registration_path
end

Expand Down

0 comments on commit 99d020e

Please sign in to comment.