lib/imdb_term/CLI.rb in imdb_term-1.0.2 vs lib/imdb_term/CLI.rb in imdb_term-1.0.4
- old
+ new
@@ -83,10 +83,10 @@
def save(id = nil)
if id.nil?
if @movies.nil? && @movie.nil?
puts 'No movie to save'
elsif !@movie.nil?
- movie_data = Scraper.scrape_movie_by_id(@movie.id)
+ movie_data = Scraper.scrape_movie_by_id(@movie[:id])
Movie.create_or_update(movie_data)
@movie = nil
puts 'Movie saved'
elsif !@movies.nil?
movies_data = @movies.map{|e| Scraper.scrape_movie_by_id(e.id)}