This is certainly a case of there being a Thousand Ways to Do It, but
looking for suggestions/guidance as a novice RoR coder.
Essentially, I have a calendar of events that I would like to extend
The events are loaded automatically from an outside source.
The functionality I would like to add is
- Allow people to add comments, tags, categories to each individual
listing (e.g. to treat the listing like a blog article)
- Write blog posts which draw info from specified events (e.g. to write
non-event articles which include from an event)
I have a well-defined Event class.
If there’s a way for an article to dynamically draw content from a ruby
element then I can just save an article when I save an event.
class EventsController < ApplicationController
@event = Event.new(params[:event])
@article = this_blog.articles.build … ???
I’d of course like to do this in a ruby-esque way that reuses code
doing nasty cut-and-pastes.
Let me know if I’m asking for a reinvention of the wheel.