resource_controller 0.2: maintenance release - no more edge_compatible branch 2

Posted by james
on Friday, February 15

This is mainly a maintenance release.

  • The helpers have been broken out in to four separate files internally, to help with managing the deep nesting branch.
  • There have also been a few little refactorings in preparation for some new features to come shortly.
  • The biggest thing to note for users is that there is no longer an edge_compatible branch. Since rails 1.2.6 generates the same style of named routes as 2.0.2 (edit_tag_photo_path instead of tag_edit_photo_path), there is no longer a need to continue two separate streams of development (yay)!.
  • The generator has been updated to spit out the right filenames for templates (rhtml/haml vs html.erb/html.haml), and old-style migrations (t.column instead of t.string) for any users still stuck on 1.2.6, so the transition shouldn't be a problem.

Get It!

You can get the new version by exporting from svn:

svn export http://svn.jamesgolick.com/resource_controller/tags/stable vendor/plugins/resource_controller

Or, if you're using piston, you may need to switch to the new url if you were previously on edge compatible (this is untested, so it may be slightly wrong).

  piston switch http://svn.jamesgolick.com/resource_controller/tags/stable
  piston update

As always, everybody is encouraged to come join the discussion on the increasingly lively mailing list.

Comments

Leave a response

  1. BoratFebruary 17, 2008 @ 12:49 AM

    It's nice! I like!

  2. TexFebruary 18, 2008 @ 04:08 AM

    Many thanks, wonderful plugin, I'm start using it just right now and it's very impressive (but in my application I have many models with has_one polymorphic relation).

    I hope you will integrate the has_one support asap, seems that it should be a very simple task, only 2 methods to patch:

      def object
        @object ||= end_of_association_chain.instance_of?(model) ? end_of_association_chain : end_of_association_chain.find(param)
      end
    
      def parent_association
        # Returns the relevant association proxy of the parent.
        # (i.e. for has_many /posts/1/comments # => @post.comments or has_one /users/1/money_account => @user.money_account)
        @parent_association ||= parent_object.send(parent_object.respond_to? (model_name.to_s.pluralize.to_sym) ? model_name.to_s.pluralize.to_sym : model_name.to_s.to_sym)
      end
    

    I see this patch @:

    http://groups.google.com/group/resourcecontroller/browsethread/thread/cdf186db9cb06a8d/93fecca7b33479b5?lnk=raot#93fecca7b33479b5

    (so, many thanks to Jon Stenqvist too...)

Comment






Clicky Web Analytics