public
Description: El Dorado is a full-stack community web application written in Ruby/Rails.
Homepage: http://almosteffortless.com/eldorado/
Clone URL: git://github.com/trevorturk/el-dorado.git
new events redirect to that event instead of index

git-svn-id: http://eldorado.googlecode.com/svn/trunk@497 
9c008b19-a030-0410-9975-d76d301b4276
trevorturk (author)
Tue Oct 23 19:59:37 -0700 2007
commit  60db7f65b2befcfc063ad9b0c618e2b8e66c6216
tree    7b0c105358c99018e21bf4bb7d38aa427275bc23
parent  df3fdb2d26d775681d641de16ae83437362ff006
...
27
28
29
30
 
31
32
33
...
27
28
29
 
30
31
32
33
0
@@ -27,7 +27,7 @@ class EventsController < ApplicationController
0
   def create
0
     @event = current_user.events.build params[:event]
0
     if @event.save
0
- redirect_to events_url
0
+ redirect_to @event
0
     else
0
       render :action => "new"
0
     end
...
27
28
29
30
 
31
32
33
...
27
28
29
 
30
31
32
33
0
@@ -27,7 +27,7 @@ class EventsControllerTest < Test::Unit::TestCase
0
     old_count = Event.count
0
     post :create, :event => {:title => "test", :description => "test", :date => Time.now }
0
     assert_equal old_count+1, Event.count
0
- assert_redirected_to events_path
0
+ assert_redirected_to event_path(assigns(:event))
0
   end
0
 
0
   def test_should_show_event

Comments

    No one has commented yet.