This seems impossible. You will need to post your view code so we can see
it.

..tony..

On Thu, Dec 3, 2009 at 11:34 AM, Ming <[email protected]> wrote:

> class Catalog
>  include DataMapper::Resource
>
>  storage_names[:default] = 'main'
>
>  property :id, Integer, :field => 'code', :key => true
>  property :item, Text
>
>  has n, :subcatalogs
>
>  def slug
>      "whatever"
>  end
> end
>
> if i try to call slug in a view, where c is an instance of Catalog,
>
> c.slug
>
> yields an undefined method error.
>
> Yet c.id and c.item access just fine.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "merb" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected] <merb%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/merb?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/merb?hl=en.


Reply via email to