Skip to content

Support for association extensions #522

Open
@noctivityinc

Description

@noctivityinc

Sorry for all the posts but I'm loving Her and just want to see it keep getting better.

I checked all the Issues and don't see this. Is there support for association extensions? For example:

class User
   has_many :addresses do 
     def count 
        # custom get that doesn't return all the records first and then add the array
     end
   end
end

so @user.addresses.count would use the defined count instead of doing what it appears now, which is:

  1. Hit the User endpoint
  2. If response includes addresses, return those, if not, hit the addresses endpoint
  3. return the count of the array

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions