Class: Moxie::ForumsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/moxie/forums_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
11
12
13
14
15
# File 'app/controllers/moxie/forums_controller.rb', line 8

def index
  @forums = Forum.all

  respond_to do |format|
    format.html # index.html.erb
    format.xml  { render :xml => @forums }
  end
end

#showObject



17
18
19
20
21
22
23
24
25
26
# File 'app/controllers/moxie/forums_controller.rb', line 17

def show
  @forum = Forum.find( params[:id] )
  @topic = Topic.new
  @topic.posts.build      

  respond_to do |format|
    format.html # show.html.erb
    format.xml  { render :xml => @forum }
  end
end