public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
Search Repo:
Switched demo user find to use DEMO_USER_ID
This fixes the broken redirect bug if the demo user's name gets changed
Michael Hartl (author)
Wed Jun 11 11:47:59 -0700 2008
commit  6951b808325741c0d29675e9e41aff8a4cf65217
tree    39bff7ad5306eeac9fb2d8a083a8e1924829eadc
parent  8ec714e1f1dc7c789f003e3a63c3ba3345ff54f7
...
25
26
27
 
 
 
 
28
...
25
26
27
28
29
30
31
32
0
@@ -25,3 +25,7 @@ end
0
 N_COLUMNS = 4
0
 # The number of raster results per page.
0
 RASTER_PER_PAGE = 3 * N_COLUMNS
0
+
0
+# Demo user's id
0
+# The admin must create a demo user in demo mode with id = 2.
0
+DEMO_USER_ID = 2
0
\ No newline at end of file
...
65
66
67
68
 
69
70
71
...
65
66
67
 
68
69
70
71
0
@@ -65,7 +65,7 @@ module AuthenticatedSystem
0
         format.html do
0
           store_location
0
           if global_prefs.demo?
0
- self.current_person = Person.find_by_name("Guest User")
0
+ self.current_person = Person.find(DEMO_USER_ID)
0
             flash[:success] = "You have been logged in as the guest user."
0
             redirect_back_or_default(home_url)
0
           else

Comments

    No one has commented yet.