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
add moderatorships controller
technoweenie (author)
Fri Jan 11 15:57:59 -0800 2008
commit  85eb161c7a303e053dcda3cf0120c6eb349b3293
tree    7f45725248e0460db5a2d9b4cfe946816c8d4d1d
parent  1ddf6337b4f424b2f91aaf99ba116ee18f46a3d3
...
1
2
 
3
4
5
...
1
 
2
3
4
5
0
@@ -1,5 +1,5 @@
0
 ActionController::Routing::Routes.draw do |map|
0
- map.resources :sites
0
+ map.resources :sites, :moderatorships
0
 
0
   map.resources :forums, :has_many => :posts do |forum|
0
     forum.resources :topics do |topic|
...
30
31
32
33
 
 
 
34
35
36
...
30
31
32
 
33
34
35
36
37
38
0
@@ -30,7 +30,9 @@ ModelStubbing.define_models do
0
     stub :other_forum, :forum => all_stubs(:other_forum), :topic => all_stubs(:other_forum_topic)
0
   end
0
   
0
- model Moderatorship
0
+ model Moderatorship do
0
+ stub :user => all_stubs(:user), :forum => all_stubs(:other_forum)
0
+ end
0
   model Monitorship
0
 end
0
 
...
11
12
13
14
 
15
16
17
...
11
12
13
 
14
15
16
17
0
@@ -11,7 +11,7 @@ describe Forum do
0
     f = Forum.new :description => 'bar'
0
     f.description_html.should be_nil
0
     f.send :format_attributes
0
- f.description_html.should == 'bar'
0
+ f.description_html.should == '<p>bar</p>'
0
   end
0
   
0
   it "lists topics with sticky topics first" do
...
18
19
20
21
 
22
23
24
...
18
19
20
 
21
22
23
24
0
@@ -18,7 +18,7 @@ describe Post do
0
     p = Post.new :body => 'bar'
0
     p.body_html.should be_nil
0
     p.send :format_attributes
0
- p.body_html.should == 'bar'
0
+ p.body_html.should == '<p>bar</p>'
0
   end
0
 end
0
 
...
35
36
37
38
 
39
40
41
...
35
36
37
 
38
39
40
41
0
@@ -35,7 +35,7 @@ describe User do
0
     u = User.new :bio => 'foo'
0
     u.bio_html.should be_nil
0
     u.send :format_attributes
0
- u.bio_html.should == 'foo'
0
+ u.bio_html.should == '<p>foo</p>'
0
   end
0
   
0
   it "sets User#display_name from login if nil" do

Comments

    No one has commented yet.