Skip to content

Instantly share code, notes, and snippets.

@mrentz
Last active January 17, 2018 02:41
Show Gist options
  • Save mrentz/3085ea19eed908df0517b267b3eda528 to your computer and use it in GitHub Desktop.
Save mrentz/3085ea19eed908df0517b267b3eda528 to your computer and use it in GitHub Desktop.
controller code
<div class="preview-pic tab-content">
<div class="tab-pane active" id="pic-1"><%= link_to image_tag(detailed[:thumbnail],
size: "300x444", alt: "image missing"),
videos_path %>
</div>
</div>
def create
if movie_already_saved?
render :show
else
@movie = movieData(params[:title])
if @movie[:thumbnail] == "N/A"
@movie[:thumbnail] = "assets/images/noimage.png"
end
render :details
end
end
@mrentz
Copy link
Author

mrentz commented Jan 17, 2018

Mind you this "gist" thing is pretty awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment