I use rails develop blog use Avtion Text
create and show is successful.
def show
require "image_processing/mini_magick"
@comment=PostComment.new
@[email protected]_comments.includes(:post).order(id: :desc)
end
def create
@post=current_user.posts.new(@clear_params)
if @post.save
redirect_to root_path
else
render :new
end
end
In the home page ,I want list each article
- I need get article first picture how can i do?
- I want show only text how can i do? I try to use "to_plain_text" but keep show picture name enter image description here