Add update to controllers

This actually does quite a bit more than adding update. I realized most of our controllers had large amounts of duplicated code due to the requirements for the JSON API format, so I attempted to abstract that code out into the JsonApiController module. 

With a few differences, that I'll correct soon, this should fully reflect the published apiary api. There are couple more small things I'd like todo, namely: add specs for each JsonApiController submodule and add scopes to the link creation process. While the module should be pretty well tested by the existing controller specs, I think they should also be tested in isolation. The scopes will be necessary to prevent users from linking to otherwise private workflows and subject sets. 

This closes #147 and #135.
I'll change the serializer to only display username/public projects when
someone else is requesting the record

On Wed, Sep 24, 2014 at 9:23 AM, Campbell Allen <notifications@github.com>
wrote:

> In app/controllers/api/v1/users_controller.rb:
>
> >    end
> >
> > -  def show
> > -    render json_api: UserSerializer.resource(params)
> > +  private
> > +
> > +  def visible_scope
> > +    User.all
>
> yep fair enough, best not to expose user details via this route though.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/zooniverse/Panoptes/pull/165/files#r17973766>.
>



-- 
Ed Paget