Re: [Rails-core] Re: Rails 3 : basic routes

2010-02-15 Thread Chad Woolley
On Mon, Feb 15, 2010 at 7:48 PM, Yehuda Katz wrote: > The catch-all route let to a series of faulty patterns such a > hide_action and verification. At it's core, the router is the > appropriate place to limit request that go onto the controllers. Agreed. Many a 2.x production app spews exception

Re: [Rails-core] Re: Rails 3 : basic routes

2010-02-15 Thread Yehuda Katz
The catch-all route let to a series of faulty patterns such a hide_action and verification. At it's core, the router is the appropriate place to limit request that go onto the controllers. In this case, removing the default route allows us to simplify the explanation of how you should go about "h

Re: [Rails-core] Re: Rails 3 : basic routes

2010-02-15 Thread Allen Madsen
I agree with Trey. People learning Rails should be learning the conventions, not the exceptions. As for the learning curve, I think it is simple enough to generate a scaffold. Allen Madsen http://www.allenmadsen.com On Mon, Feb 15, 2010 at 8:53 PM, Trey wrote: > Hey Anthony, > > Great observat

[Rails-core] Re: Rails 3 : basic routes

2010-02-15 Thread Trey
Hey Anthony, Great observation here. The only thing I would say is to define "beginners" and how you want to teach them. We're all being pushed towards a more RESTful design - both by Rails and by web development in general. So it seems that a framework has to make a decision - do we make it eas

[Rails-core] Rails 3 : basic routes

2010-02-15 Thread ahe
Hi, When you generate a new Rails 3 project, "basic" routes are disabled by default because this line is commented out : # match ':controller(/:action(/:id(.:format)))' Is it really necessary? What about people learning Rails who are not familiar with REST? It was so easy to teach beginners : ju

Re: [Rails-core] Unnecessary exception raised in AS::Dependencies.load_missing_constant

2010-02-15 Thread Andrew White
On 15 Feb 2010, at 14:26, Yehuda Katz wrote: > Actually that's precisely where it belongs. ActiveSupport::Dependencies > should mirror the Ruby logic exactly (in other words, it should be possible > to require all the files manually and have everything work). If > Admin::Account has_many :user

[Rails-core] Re: Testing Rails Engine plugins with Rails 3

2010-02-15 Thread Daniel Guettler
Not sure if this helps you, but I'm treating all my engine plugins as standalone rails applications. What this means is each engine plugin is theoretically able to run as a standalone application and can therefor be tested the same way as any other rails application. I think the overhead is accepta

Re: [Rails-core] Testing Rails Engine plugins with Rails 3

2010-02-15 Thread Dan Croak
I'm not content with the current testing strategy for Clearance. It has served us well for the 2.x series of Rails but not for Rails 3 while maintaining backwards compatibility. The most extensive backwards Rails compatibility testing of a library I've seen is in Hoptoad Notifier: http://github.c

[Rails-core] Re: Testing Rails Engine plugins with Rails 3

2010-02-15 Thread Venue Driver
Hello Anuj, thank you for your help. My problem is: how do I get the Rails app that's in test/rails_root to load the plugin? The Rails app is inside of the plugin, rather than the plugin being inside of the Rails app like normal. test/rails_root/ vendor/plugins is empty so it doesn't load any pl

Re: [Rails-core] Unnecessary exception raised in AS::Dependencies.load_missing_constant

2010-02-15 Thread Yehuda Katz
Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 On Mon, Feb 15, 2010 at 6:15 AM, Andrew White wrote: > > On 15 Feb 2010, at 13:31, Yehuda Katz wrote: > > > I wouldn't. I consider Rails' lookup from disk to be an alternate form of > constant lookup, and I'd want it to use semantics that ar

Re: [Rails-core] Unnecessary exception raised in AS::Dependencies.load_missing_constant

2010-02-15 Thread Andrew White
On 15 Feb 2010, at 13:31, Yehuda Katz wrote: > I wouldn't. I consider Rails' lookup from disk to be an alternate form of > constant lookup, and I'd want it to use semantics that are identical to > Ruby's semantics: > > class Foo::Bar > Baz > # normal Ruby: will search Foo::Bar::Baz and Obj

Re: [Rails-core] Unnecessary exception raised in AS::Dependencies.load_missing_constant

2010-02-15 Thread Yehuda Katz
Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 On Mon, Feb 15, 2010 at 5:19 AM, Andrew White wrote: > > On 15 Feb 2010, at 12:11, Yehuda Katz wrote: > > > I couldn't think of or find any reason for these cases to be different. > My guess is that the behavior was added to classes at some

Re: [Rails-core] Unnecessary exception raised in AS::Dependencies.load_missing_constant

2010-02-15 Thread Andrew White
On 15 Feb 2010, at 12:11, Yehuda Katz wrote: > I couldn't think of or find any reason for these cases to be different. My > guess is that the behavior was added to classes at some point (due to STI > needs) but never added to modules (since it never came up). In any event, > there's no way to

Re: [Rails-core] Unnecessary exception raised in AS::Dependencies.load_missing_constant

2010-02-15 Thread Andrew White
On 15 Feb 2010, at 01:32, Yehuda Katz wrote: > What I'd like to understand is what the various cases are that could trigger > this branch. In particular, I'm interested in understanding the cases without > reference to ActiveRecord (which it looks like you and others have started to > do). Ac

Re: [Rails-core] Unnecessary exception raised in AS::Dependencies.load_missing_constant

2010-02-15 Thread Yehuda Katz
Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 On Mon, Feb 15, 2010 at 12:10 AM, Andrew White wrote: > On 15 Feb 2010, at 01:32, Yehuda Katz wrote: > > > What I'd like to understand is what the various cases are that could > trigger this branch. In particular, I'm interested in understand

[Rails-core] possible bug: using assert_recognizes with extras

2010-02-15 Thread Jarl Friis
Hi. I am trying to use the extras hash parameter in assert_recognizes. I am using. assert_recognizes(expected_options, path, extras={}, message=nil) I have something similar to the documentation: assert_recognizes {:controller => 'items', :action => 'list', :id => '1', :view => 'print'}, 'item

Re: [Rails-core] Unnecessary exception raised in AS::Dependencies.load_missing_constant

2010-02-15 Thread Andrew White
On 15 Feb 2010, at 01:32, Yehuda Katz wrote: > What I'd like to understand is what the various cases are that could trigger > this branch. In particular, I'm interested in understanding the cases without > reference to ActiveRecord (which it looks like you and others have started to > do). Wel