Colin Law wrote:
[...]
> I have a problem with YM4R however.  The concept there is to construct
> the map object in the controller and then display it in the view.  

It's been a while since I've touched that part of my codebase, so I had 
temporarily forgotten that.

I'm actually no longer quite using YM4R's view code in any case, since 
it puts JavaScript in the HTML files, which is poor practice.

> I
> suggest that the map is not an object to be set up in the controller
> but is a feature of the view. 

I suggest that you're probably wrong.  If the map is to be treated as an 
object at all (admittedly, that's a nontrivial if), then the controller 
is by definition the appropriate place to load it.

> I setup the data to be viewed in the
> controller/model (@markers to hold the markers for example) and then
> construct the map in the view just using the mapstraction (or google)
> js API.  I believe this fits the MVC architecture better.

This is more or less what I do as well, but whether it's a better use of 
MVC or not depends on whether you consider the map or the markers to be 
the primary objects.

> 
> Colin

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
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 [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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to