Rails design of an online newspaper -- controllers -


i have started ruby on rails 3 project make online version of newspaper. front page has news headlines, sports headlines , life headlines. has headlines different sections of site.

all stories stored in 1 table , photos in table. simple set up. trying dry can't seem avoid it. on index action page have sports stories , on sports action page have sports.

my question should make different controller every category? or have main controller categories actions? ( doing now? )

i have single story controller takes querystring determine category. in other words, if go

/stories/

you front page, lists (or portion of all) stories. if want sports go

/stories/?category=sports

and story controller filters list of stories (and presumably alters view headings, etc.) based on querystring.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -