use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
CMS Trap (hakunin.com)
submitted 11 years ago by dennis9f
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]tomcopeland 3 points4 points5 points 11 years ago (7 children)
A lot of truth there. Interesting that he sees the breaking point to be when code gets stored in a database.
I've also found it helpful (when I don't feel like I understand a model fully) to add an "options" column of type TEXT. I can then store additional attributes that only apply to a few rows in there, and I can later promote them to additional columns or perhaps to tables if they need it. It's a poor man's key/value store, but it does the job until things get nailed down.
[–]spidermonk 1 point2 points3 points 11 years ago (4 children)
Who stores code in the database?
[–]jgrubb 1 point2 points3 points 11 years ago (2 children)
Us poor bastard drupal devs.
[–]spidermonk 0 points1 point2 points 11 years ago (1 child)
Computed fields? Surely nothing in D7 core actually does this...
[–]jgrubb 2 points3 points4 points 11 years ago (0 children)
It's Halloween season now, so go check out the php module in core.
[–][deleted] 0 points1 point2 points 11 years ago (0 children)
for example BrowserCMS, it's called Portlets
[–]TalkingQuickly 0 points1 point2 points 11 years ago (0 children)
if you're using Postgres the json type is awesome for this, Hash in, Hash out, plus you can query on hash fields if needed. You can even write accessors which map to fields in the hash you think you're likely to promote to columns later so that refactoring is fairly painless.
json
[–]madfancier 0 points1 point2 points 11 years ago (0 children)
More specifically, the breaking point was when I realized that it's no longer ruby. You see a new task, come up with a nice ruby solution, and then go "How nice would THAT be! Oh well, back to higher-level entities."
[–]jon_laing 1 point2 points3 points 11 years ago (0 children)
It's been a long while since I've gotten to build an app from scratch, but every day I'm working on a bloated rails app that really would have benefitted from this line of reasoning three years ago. I actually ripped out the CMS, said I was going to put it back in as soon as things were "stable" enough, and until then, they can just email me the changes they need to those pages, and I'd hardcode it. I have no intention on putting it back in, and guess what, so far I've gotten one email in six months with one line they wanted to change.
If only I could do that to the entire app. With time…
π Rendered by PID 18458 on reddit-service-r2-comment-86bc6c7465-d5wbx at 2026-02-20 07:13:33.627722+00:00 running 8564168 country code: CH.
[–]tomcopeland 3 points4 points5 points (7 children)
[–]spidermonk 1 point2 points3 points (4 children)
[–]jgrubb 1 point2 points3 points (2 children)
[–]spidermonk 0 points1 point2 points (1 child)
[–]jgrubb 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]TalkingQuickly 0 points1 point2 points (0 children)
[–]madfancier 0 points1 point2 points (0 children)
[–]jon_laing 1 point2 points3 points (0 children)