Created
February 18, 2016 14:45
-
-
Save tonkec/79c881a1b3d0d04d784a to your computer and use it in GitHub Desktop.
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
<%= search_form_for @q do |f| %> | |
<%= f.text_field :description_cont %> | |
<%= f.submit %> | |
<% end %> |
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 index | |
@posts = Post.all | |
@q = Post.ransack(params[:q]) | |
@posts_s = @q.result.includes(:description).page(params[:page]) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment