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 |
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
This is directly from the "image_tag" documentation on Rails.org
image_tag("icon.png", size: "16x10", alt: "Edit Entry")
which produces
=>![Edit Entry](/assets/icon.png)
and it is what I have done identically in the view partial above.
but I keep getting
ActionView::Template::Error (The asset "assets/images/noimage.png" is not present in the asset pipeline.):
I don't get it?