Friday, December 24, 2010

[Rails] Re: Re: Does using :render => :partial breaks the MVC separation during an ajax call

Colin Law wrote in post #970508:
> On 24 December 2010 14:29, Marnen Laibow-Koser <lists@ruby-forum.com>
> wrote:
>> ivanpoval wrote in post #970446:
>>> The code sample you provided is very common and many respectful Rails
>>> developers use it.
>>> If we go out of the scope of Rails and start speaking very strictly
>>> about MVC, then probably we can say that it is not actually the
>>> controller's job to do that type of things.
>>
>> No. It *is* the controller's job to trigger render operations. There's
>> nothing un-MVC about this at all.
>
> Is the fact that the controller is specifying that a particular div
> should be updated ('my_div' in this case) a bit non-MVC?

Good point! Yes, that might be. So is the fact that the controller
contains literal RJS, but that's just the way to get it to contain a
render :partial statement.

>
> Colin

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org

Sent from my iPhone

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate