Is there a way to use current_page? to check if the user is at posts/x where x is any number? I am trying to use facebook's OG meta tags but I need to only show them if the user is at the show action of my Posts Controller.
What I currently have (yields an error because of the lack of id):
<%if current_page?(controller:"posts",action:"show")%>
<meta property="og:title" content=" <%= @post.title %>" />
<meta property="og:description" content="<%= @post.body.html_safe %>" />
<meta property="og:image" content="<%=URI.join(request.url,@post.news_image.url) %>" />
<%end%>
I plan to put this in the Header part of my application.html.erb, hence the need to find a way to determine if the current page is the show action. Any ideas on how I can use current_page or any other solutions?