public
Fork of courtenay/altered_beast
Description: Ground-up rewrite of Beast, a Ruby on Rails forum.
Homepage: http://activereload.lighthouseapp.com/projects/7537-altered-beast/
Clone URL: git://github.com/technoweenie/altered_beast.git
Fix for initial post if topic is locked.
James Cook (author)
Wed May 14 07:41:18 -0700 2008
commit  a1e03c13178ed37562bcdca0b58bd90b642c0275
tree    70e256273dc4622422f6423a0a7bcf4d4435ace1
parent  54642e01410f93be9d3716e5ac634a7c8248b0aa
...
37
38
39
40
 
41
42
43
...
37
38
39
 
40
41
42
43
0
@@ -37,6 +37,6 @@ protected
0
   end
0
   
0
   def topic_is_not_locked
0
- errors.add_to_base("Topic is locked") if topic && topic.locked?
0
+ errors.add_to_base("Topic is locked") if topic && topic.locked? && topic.posts_count > 0
0
   end
0
 end
0
\ No newline at end of file
...
69
70
71
72
 
73
74
75
...
69
70
71
 
72
73
74
75
0
@@ -69,7 +69,7 @@ class Topic < ActiveRecord::Base
0
 
0
 protected
0
   def create_initial_post
0
- user.reply self, @body unless locked?
0
+ user.reply self, @body #unless locked?
0
     @body = nil
0
   end
0
   

Comments

    No one has commented yet.