Actually, the model in no way relies on the implementation of the  
helper.  The reason that you separate the model from the view is that  
you don't want your models implementation depending on any view of  
the model.  In this case, the model is untouched, other than the  
forwarding of methods to the helper.  In fact, you could use the  
library this way:

ActiveRecordHelper.new(the_record).render or ActiveRecordHelper.new 
(the_record).form ... etc

The helperize! method is just for convenience (so you don't have to  
call the_helper.the_model) and is not required.

On Dec 8, 2006, at 8:16 AM, Obie Fernandez wrote:

>
> -1
>
> Creative idea, but completely messes up the nice separation of
> concerns we have going on right now in Rails. I think it would
> detrimental in the long run.
>
> On 12/7/06, Rich Collins <[EMAIL PROTECTED]> wrote:
>> I heard in #caboose that you are interested in working on OO model
>> helpers.  I have actually been working on this for a few weeks.  I am
>> planning on releasing a plugin called SimplyBeautiful that does just
>> that:
>>
>> example:
>>
>> def update
>>    foo = Foo.new.helperize!
>>    foo.update_attributes(params[:foo])
>>    render :update do |page|
>>      foo.replace_on(page)
>>      foo.highlight_on(page)
>>    end
>> end
>>
>> foo.form do |f| ...
>>
>> foo.render (for partials)
>>
>> ... etc
>>
>> The plugin (still rough) is attached
>>
>>
>>
>>>
>>
>>
>
> >


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Ruby on Rails: Core" 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/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to