Skip to content

Commit

Permalink
Merge pull request #4 from TheresaManney/rs/movies_controller
Browse files Browse the repository at this point in the history
Added index method to movies_controller
  • Loading branch information
RanaSulaiman authored May 9, 2017
2 parents 759e6cf + 1bc9fbe commit fcdcb06
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/controllers/movies_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
class MoviesController < ApplicationController
def zomg
render json: "it works!"
end

def index
movies = Movie.all
render json: movies.as_json(except: [:created_at, :updated_at])

end


end

0 comments on commit fcdcb06

Please sign in to comment.