Last active
January 17, 2018 02:41
-
-
Save mrentz/3085ea19eed908df0517b267b3eda528 to your computer and use it in GitHub Desktop.
controller code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mind you this "gist" thing is pretty awesome!