If I understand correctly, do you execute the DashboardsController#index, show the page, and retrieve the hidden_field to DashboardsController#index again?
Rails executes the controller first, then render the view. It's a one way trip, never returns to controller again, except you click a button or what.
So you execute DashboardsController#index , get the enough information and transfer them to view/dashboards/index.
For this case, in controller, It seems like @feed_posts is enough.
class DashboardsController < ApplicationController
def index
@feed_posts = blablablabla
end
end
posts/show, use post directly:
<%#= hidden_field_tag :post_id, post.id %>
# want to access this value in dashboards/index action
<div class="comments">
<p>this is a comment part - posts/show</p>
<%= render :partial => 'comments/form', :locals => { :comment => Comment.build_from(post,currrent_user,''), :post => post } %>
<%= render :partial => 'comments/comment', :locals => { :collection => post.comment_threads.order('created_at desc'), :as => :comment, :post => post } %>
</div>