Mike Gaffney wrote: > I'm not really sure how it will help as you will massively bloat the > pages with all of those pre loaded parts. Its why its ajax in the > first place.
Perhaps, but it should also not be too difficult to try it out Shooting from the hip I would suggest you look at the various partials which generate the new/edit forms. These are generated dynamically and to keep that flexibility you probably want to do something like building your js files by calling render on these templates, capturing the output and building your js files in some way from that. Probably do something clever like render it with an arbitrary value for the ID field and then you can swap out that ID value for the real value on the frontend? Sounds like it could be a fair bit of work though. Would definitely improve "snappiness" though Note another solution might be to work on making the ajax more snappy - for example it does take a little time to render AS calls at present and this could definitely be improved (or even cached) It may be that this turns out to be a better path. In particular I would like to see the AS render path become much simpler and simply become an iteration over a bunch of functions to render each column. This would be achieved by pre-walking the model to figure out what kind of render function to use for each column and caching the answer. This would strip out a lot of "method_missing" calls, iterated for each column and each row and my quick benchmarks suggest a large speedup (mostly due to less garbage collection calls) If anyone wants to work on this I am short of time and would consider paying for some development work? All the best Ed W --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
