search for: post_date

Displaying 5 results from an estimated 5 matches for "post_date".

2011 Jan 08
1
Paperclip custom Interpolation in url
...w) class Post < ActiveRecord::Base has_many :comments end class Comment < ActiveRecord::Base belongs_to :post has_attached_file :photo, # :url => "/assets/class_cal/<original post date>/:id/:style/:basename.:extension" :url => "/assets/post/:post_date/:id/:style/:basename.:extension" end What I want to do: I am trying to insert the "original post date" in the url with the :post_date (stored in the Post model) interpolation function as defined in the Paperclip Interpolation module below. ------------------------------------------...
2007 Jun 19
1
Display Options While Paginating
I have a table full of articles that I want to paginate. Easy enough with: [Controller] @article_pages, @articles = paginate(:articles, :per_page => 20, :order => ''post_date DESC, title ASC'') BUT, there are different types of articles: regular news articles (designated NA), and press releases (designated PR). If I want to put each type in a different table on the same page, what is a good way to go about doing that? Thanks. --~--~---------~--~----~-------...
2008 Jul 04
4
select_datetime // datetime_select
Hi I have 2 question for you guys, 1. Which is the difference between this two methods? (select_datetime, datetime_select) 2. How I assign the selected date-time values, to an specific variable or array using select_datetime I know do it using datetime_select(''object'',''method'') I aprecciate your attention. Thanks PD: Sorry about my english.
2006 Jan 04
5
help with link_to_if, I can''t make it work...
For the life of me I can''t get it to work. Here is an example of my syntax. I''m trying to make comment.name a link to comment.web_site only if there is a comment.web_site. Can someone please help? <%= link_to_if(comment.web_site.length > 0, comment.name, comment.web_site {"class" => "comment_by"}) %> -- Posted via
2006 Jun 20
0
No opening form tag in rendered HTML
...t;br/> <%= text_field ''post'', ''subject'' %></p> <p><label for="post_poster">Poster</label><br/> <%= text_field ''post'', ''poster'' %></p> <p><label for="post_date">Date</label><br/> <%= datetime_select ''post'', ''date'' %></p> <p><label for="post_time_range">Time range</label><br/> <%= datetime_select ''post'', ''time_range''...