Oh! Thanks! That totally works! I had no idea those methods in the
ModelExtensions existed!

This looks great. One quick question. How do I mix in these hobo
fields without an ActiveRecord base class? This:

class Foo
  include HoboFields::ModelExtensions
  declare_field :bar, :string
end

exceptions out because ModelExtensions seems to expect a belongs_to
method:

(line 79)
class << self
  alias_method_chain :belongs_to, :field_declarations
end

On Nov 17, 2:09 am, Tom Locke <[EMAIL PROTECTED]> wrote:
> > And if no HoboField, then no polymorphic view tag. (Maybe
> > I'm wrong about this).
>
> You can do
>
> def foo
>    ...
> end
> declare_attr_type :foo, :markdown
>
> And, if you want just a simple getter/setter
>
> attr_accessor :foo, :type => :markdown
>
> > My ultimate dream, by the way, is for Hobo to have a kind of spec for
> > objects that can be passed into <form/> tags. That way, I could make
> > any kind of object -- whatever my preferences might be -- play nice
> > with the Rapid tags, not just ActiveRecord::Base descendants.
>
> We definitely want to support non AR objects, but the idea is to use  
> Ruby's existing type system, rather than having to pass around extra  
> metadata.
>
> Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to