Skip to content

Commit

Permalink
Initial spike on discussions stub + controller
Browse files Browse the repository at this point in the history
  • Loading branch information
practicingruby committed Mar 16, 2012
1 parent 8c3f61f commit 30e803d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/controllers/discussions_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class DiscussionsController < ApplicationController
def index
render :text => Discussion.reviews
end
end
19 changes: 19 additions & 0 deletions app/models/discussion.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class Discussion
def self.conversations
[ "How awesome is Jordan Byron?",
"How many unicorns does it take to make a rainbow?",
"Can someone ask a serious question please?" ]
end

def self.evaluations
[ "My s10-e2 is ready for evaluation",
"Revisions have been made to my s10-e1",
"Come on, evaluate it, you know you want to!" ]
end

def self.reviews
["Messy first spike on my individual project",
"Proof of concept patch to add archives to Newman",
"If you don't review this soon, I might go crazy!"]
end
end
4 changes: 3 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
match '/auth/failure' => 'sessions#failure'
match '/logout' => 'sessions#destroy', as: 'logout'

resources :courses
resources :courses do
resources :discussions
end
end

0 comments on commit 30e803d

Please sign in to comment.