Displaying 2 results from an estimated 2 matches for "month_post".
Did you mean:
  month_posts
  
2006 Apr 05
8
Pass paramter via form
...20" %>
  <%= submit_tag ''Search''  %></p>
<%= end_form_tag %>
And below i have the def in the  blog controller
def search
    @posts = Post.search_posts(:search)
    @categories = Category.find(:all, :order => "name asc")
    @archive = Post.month_posts(4)
end
I cant seem to pass the value in the search textbox to the def search in 
the blog controller.  The SQL query on the post model works fine when i 
input arguments myself.  Code for post model below.
def self.search_posts(args)
    find(:all,
    :conditions => "title LIKE '...
2006 Apr 05
7
Archive monthly count for blog
I am creating a blog to learn ruby on rails.
from the layout page i pass all the posts as a collection to 
_archive.rhtml
<%= render :partial => "archive", :collection => @archive %>
On _archive.rhtml i have access to the collection.  I am then gone to 
render partial another page _archivecount.rhtml to display the number of 
posts for each month.
Can anyone give a clue