Google Groups Home
Help | Sign in
Message from discussion .each { |m| delegate m, :to => :published_at }
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Neeraj Kumar  
View profile
 More options Jan 1 2007, 1:37 am
From: "Neeraj Kumar" <neeraj....@gmail.com>
Date: Mon, 1 Jan 2007 01:37:25 -0500
Local: Mon, Jan 1 2007 1:37 am
Subject: [:year, :month, :day].each { |m| delegate m, :to => :published_at }

Given below is a model from mephisto blogging tool.

class Content < ActiveRecord::Base
  filtered_column :body, :excerpt
  belongs_to :user, :with_deleted => true
  belongs_to :site
  [:year, :month, :day].each { |m| delegate m, :to => :published_at }
end

I couldn't understand the last line.

Anyone care to explain what's happening in the last line.

Thanks.
- Neeraj


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google