The Artima Developer Community
Sponsored Link

Java Buzz Forum
Autoload Support for Models in Subdirectories Removed

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Paul Kilroy

Posts: 58
Nickname: paulkilroy
Registered: Jul, 2004

Paul Kilroy is a Frustrated Programmer
Autoload Support for Models in Subdirectories Removed Posted: Sep 26, 2006 4:29 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Paul Kilroy.
Original Post: Autoload Support for Models in Subdirectories Removed
Feed Title: The Frustrated Programmer
Feed URL: http://liberty.phpwebhosting.com/404.html
Feed Description: The problems I encounter on a daily basis, blogged for posterity. All content will be original, contain poor grammar and a few mispellings.
Latest Java Buzz Posts
Latest Java Buzz Posts by Paul Kilroy
Latest Posts From The Frustrated Programmer

Advertisement
The auto loading path which make models in subdirectories of app/models load in Ra about sex back then but I'd read about it in The Joy of Sex and watched it on TV. There's something about actually doing it that you don't understand through those other mediums.


Learning about testing has been a very similar experience for me. I've known about it for awhile, all my programmer friends say they're doing it, and I've even read Test Driven Development By Example by Kent Beck. But doing it for the first time is a completely different experience. At first, I didn't know exactly what I was doing, I was aimlessly exploring the inputs and outputs, and before I knew it, I'd had my first testing orgasm. The tests I was writing discovered a serious bug in my code. That's when it clicked for me, really understanding what test driven development is about. If I had written the tests first, the specific bug they revealed wouldn't have existed in the first place.


Now that I've popped my testing cherry, I want to keep doing i you quickly found out that it conflicted with AR's quote column method. No longer is this an issue. def quote has been changed to def quote_value

  • Calling image_tag without the file extension now raises a Deprecation warning. In 2.0, it will no longer append .png to the file name. This is welcome change, unneeded magic is well...unneeded.

  • UPDATE: This change has been reverted for the time being. Now you can access the locals hash directly. In your partials, you can check if a local varialbe was passed in by doing:
    if locals[:local_var] then ...

  • In 2.0, the default for foreign_keys will be the association name, rather than the class name. So if you specify a :class_name with no :foreign_key on your belongs_to associations, it will throw a Deprecation warning. The tests explain this pretty well:

    def test_deprecated_inferred_foreign_key  
      assert_not_deprecated { Company.belongs_to :firm }  
      assert_not_deprecated { Company.belongs_to :client, :foreign_key => "firm_id" }  
      assert_not_deprecated { Company.belongs_to :firm, :class_name => "Firm", :foreign_key => "client_of" }  
      assert_deprecated("inferred foreign_key name") { Company.belongs_to ss="selected">...</li>    -> $('sidebar').down('li.selected')  
         </ul>                               
         <ul id="menu">                    -> $('sidebar').down('ul').next()  
    
    

  • Rails will actually use the 500.html thats been sitting in public for awhile when your application fails to catch an exception not related to routing.

  • In the testing department, assert_tag has been deprecated in favor of the new assert_select family of assertions.

  • Another one of my patches got applied. radio_button_tag now generates a unique id attribute based on the name_value pattern.

  • And plenty of other deprecation warnings throughout Rails...those you can figure out for yourself.

  • Read: Autoload Support for Models in Subdirectories Removed

    Topic: JewelCLI Intial Release Previous Topic   Next Topic Topic: Flickr: Climbing the Value Chain

    Sponsored Links



    Google
      Web Artima.com   

    Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use