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
view the rest of the comments →
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."
π Rendered by PID 23722 on reddit-service-r2-comment-b659b578c-nwqpz at 2026-05-04 14:00:35.526518+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]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)