Permalink
Browse files

setup assocations before filter data

  • Loading branch information...
1 parent bd58ef6 commit 04b091db29ebf19d2124c778fcea7d92dfaf2df1 @mkristian committed Mar 13, 2013
Showing with 3 additions and 19 deletions.
  1. +3 −19 app/serializers/user_serializer.rb
@@ -54,7 +54,7 @@ class UserSerializer < Ixtlan::Babel::Serializer
:only => [:id, :name]
}
},
- :methods => [:applications, :regions]
+ :methods => [:applications, :domains, :locales, :regions]
}
})
@@ -82,24 +82,8 @@ def setup_associations(options = {})
end
private :setup_associations
- def to_json(options = nil)
- opts = filter.options.dup
- opts.merge!(options) if options
- setup_associations(opts) unless collection?
+ def setup_filter(options = nil)
super
- end
-
- def to_xml(options = nil)
- opts = filter.options.dup
- opts.merge!(options) if options
- setup_associations(opts)
- super(opts)
- end
-
- def to_yaml(options = nil)
- opts = filter.options.dup
- opts.merge!(options) if options
- setup_associations(opts)
- super(opts)
+ setup_associations( filter.options ) unless collection?
end
end

0 comments on commit 04b091d

Please sign in to comment.