[Rails-core] Re: Musings - how thin can controllers go

2007-04-12 Thread Rich Collins
Heh actually I wrote the code before I read Fowler's article. I just got sick of helpers as they are not particularly OO. I started talking to people about the code and they pointed to me his article. Learning that the concept had a name allowed me to change my plugin from the questionably

[Rails-core] Re: Musings - how thin can controllers go

2007-04-12 Thread Rich Collins
I have a plugin that provides a layer of presenter classes that are mapped to domain classes: http://simply_presentable.richcollins.net/ On Apr 11, 2007, at 7:43 PM, Tim Connor wrote: > > Hey Courtenay, > > I guess I'll have to take a closer look at mephisto, if only for > another perspective

[Rails-core] Re: Trac Report Issue

2007-01-22 Thread Rich Collins
Awesome. Thanks for checking into it Jeremy On Jan 22, 2007, at 7:03 PM, Jeremy Kemper wrote: > On 1/22/07, Rich Collins <[EMAIL PROTECTED]> wrote: > > The info for my user here: > > http://dev.rubyonrails.org/query? > status=new&status=assigned&status

[Rails-core] Trac Report Issue

2007-01-22 Thread Rich Collins
The info for my user here: http://dev.rubyonrails.org/query? status=new&status=assigned&status=reopened&status=closed&reporter=% 7Erichcollins&order=priority Does not match the report here: http://dev.rubyonrails.org/report/39?sort=author&asc=0&DATE=2007-01-01 Not trying to be a pain in the

[Rails-core] Re: Testing Patches Need Lovin

2007-01-18 Thread Rich Collins
I do as well. The first one is actually a fairly critical bug. Borderline blocker. It has to do with creation of the join model with has_many :through: http://dev.rubyonrails.org/ticket/7153 The others (mostly just test coverage from heckle - thanks Kevin) http://dev.rubyonrails.org/ti

[Rails-core] Re: Plugin for presenters

2007-01-06 Thread Rich Collins
I use SingleForwardable (http://ruby-doc.org/core/classes/ SingleForwardable.html), a type of proxy that defines methods and sets instance variables (AFAIK). On Jan 6, 2007, at 2:20 PM, Michael Koziarski wrote: I used the bang because the present method is doing something somewhat danger

[Rails-core] Re: Plugin for presenters

2007-01-06 Thread Rich Collins
version _aliased_ to it. Maybe it's just me, but when I see a big mistake like that in someone's code it immediately raises red flags about what other problems might be lurking in the codebase. I recommend you drop the bang version of the method. Cheers, Obie On 1/5/07, Rich Collins <[

[Rails-core] Re: Plugin for presenters

2007-01-05 Thread Rich Collins
t/svn/simply_presentable_example On 1/6/07, Rich Collins <[EMAIL PROTECTED]> wrote: I just released a plugin that adds presenters to rails. We have been using it internally, so I would love to get some external feedback. Please let me know what you think: http://simply_presentable.richcollins.net/ >

[Rails-core] Re: Plugin for presenters

2007-01-05 Thread Rich Collins
Crap I thought I did - sorry I'll fix it On Jan 5, 2007, at 7:53 PM, Michael Koziarski wrote: The example app is asking for a password, perhaps you need to enable public access to: http://richcollins.net/svn/simply_presentable_example On 1/6/07, Rich Collins <[EMAIL PROTECTED]>

[Rails-core] Plugin for presenters

2007-01-05 Thread Rich Collins
I just released a plugin that adds presenters to rails. We have been using it internally, so I would love to get some external feedback. Please let me know what you think: http://simply_presentable.richcollins.net/ --~--~-~--~~~---~--~~ You received this m

[Rails-core] Re: Object Oriented Model Helpers

2006-12-09 Thread Rich Collins
y be safe in most cases. I am interested to see how Liquid Drops work to see if that would be a more appropriate alternative. Rich On Dec 8, 2006, at 6:45 PM, Michael Schuerig wrote: > > On Saturday 09 December 2006 00:16, Rich Collins wrote: >> Thanks for the links. I think

[Rails-core] Re: Object Oriented Model Helpers

2006-12-08 Thread Rich Collins
Thanks for the links. I think it would be fair to characterize the objects created by my plugin as "Presenters". They generate data (html markup) related to the presentation of the models without explicit instructions regarding the layout (css). I see that people are going to be hung up

[Rails-core] Re: Object Oriented Model Helpers

2006-12-08 Thread Rich Collins
I kind of pushed it out early as I heard something called presenters were being considered. It was not really ready for external use, but I wanted to put it out there to join the impending conversation about OO helpers. I extracted it from an a real world application that we are developi

[Rails-core] Re: Object Oriented Model Helpers

2006-12-08 Thread Rich Collins
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]> wr

[Rails-core] Object Oriented Model Helpers

2006-12-07 Thread Rich Collins
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

[Rails-core] Re: simply_helpful enhancements

2006-11-13 Thread Rich Collins
Right - I added support for the case where you do not have an instance variable set On Nov 13, 2006, at 2:47 PM, Marcel Molina Jr. wrote: > > On Mon, Nov 13, 2006 at 02:38:07PM -0800, Rich Collins wrote: >> Ah wait. You are using @page. Try it with a local variable: >>

[Rails-core] Re: simply_helpful enhancements

2006-11-13 Thread Rich Collins
'm doing this at present: > > <%= render :partial=>@page %> > > with _page.rhtml happily working with the page > > <%= page.title %> > > > > >> On Nov 13, 2006, at 12:53 PM, Michael Koziarski wrote: >> >>> >>> On 11/13/06,

[Rails-core] Re: simply_helpful enhancements

2006-11-13 Thread Rich Collins
trying to >> access the variable in the partial template > > I'm doing this at present: > > <%= render :partial=>@page %> > > with _page.rhtml happily working with the page > > <%= page.title %> > > > > >> On Nov 13, 2006, at 12

[Rails-core] Re: simply_helpful enhancements

2006-11-13 Thread Rich Collins
It does not. I would get a method_missing on nil when trying to access the variable in the partial template On Nov 13, 2006, at 12:53 PM, Michael Koziarski wrote: > > On 11/13/06, Rich Collins <[EMAIL PROTECTED]> wrote: >> >> I added support for spacer_templat

[Rails-core] simply_helpful enhancements

2006-11-13 Thread Rich Collins
I added support for spacer_template: render :partial => @foos, :spacer_template => 'foos/between' You can also omit :object: render :partial => @foo http://dev.rubyonrails.org/ticket/6609 --~--~-~--~~~---~--~~ You received this message because you are subscrib

[Rails-core] Tests for ActionView::Base

2006-11-13 Thread Rich Collins
I have some patches for simply_helpful that allow: render :partial => @some_collection, :spacer_template => 'the_template' render :partial => @some_object I need to test the aliased render and render_partial methods. Where can I find some examples of writing tests for ActionView::Base? Rich

[Rails-core] Re: Stopping a callback chain should require an explicit method call

2006-10-27 Thread Rich Collins
http://www.amazon.com/Design-Everyday-Things-Donald-Norman/dp/0385267746 :POn Oct 27, 2006, at 6:15 PM, Nicholas Seckar wrote:On 10/27/06, Martin Emde <[EMAIL PROTECTED]> wrote: A ruby programmer that doesn't pay attention to his/her implicit return value will probably run into a lot more problems

[Rails-core] Re: Stopping a callback chain should require an explicit method call

2006-10-27 Thread Rich Collins
CTED]>: >> On Fri, Oct 27, 2006 at 09:11:04AM -0700, Rich Collins wrote: >>> "It's OK to forget or get bitten by this a few times" >> >> This has come up. A while ago we had decided that throw/catch >> might be a good >> api for this. Someth

[Rails-core] Re: Stopping a callback chain should require an explicit method call

2006-10-27 Thread Rich Collins
"It's OK to forget or get bitten by this a few times" That is not a good design philosophy. Stopping the chain by returning false violates the principle of least surprise. I think a stop_chain method should be added and there should be a deprecation warning for filters returning false. On

[Rails-core] subscribe

2006-08-25 Thread Rich Collins
subscribe --~--~-~--~~~---~--~~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTE

[Rails-core] Re: [Rails] Making rails thread safe, priority or not?

2006-08-24 Thread Rich Collins
Why not continuations instead?On Aug 24, 2006, at 1:46 PM, Jeremy Kemper wrote:(posting to -core as well.)On 8/24/06, snacktime <[EMAIL PROTECTED]> wrote: I know there has been a lot of talk about rails and thread safety.Could you point me to these discussions? Maybe I've missed it, but I havent' s