Minor refactoring of StatusesAPI

Remove unnecessary ivars, absolute namespacing.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/1634/head
Alex Coles 10 years ago
parent 6cfb35d013
commit c2f3c858be
  1. 5
      lib/api/v3/statuses/statuses_api.rb

@ -35,12 +35,11 @@ module API
resources :statuses do
before do
@statuses = Status.all
models = @statuses.map { |status| ::API::V3::Statuses::StatusModel.new(status) }
@represented = ::API::V3::Statuses::StatusCollectionRepresenter.new(models)
@statuses.map! { |status| StatusModel.new(status) }
end
get do
@represented
StatusCollectionRepresenter.new(@statuses)
end
end

Loading…
Cancel
Save