Method: Marty::Posting.make_name
- Defined in:
- app/models/marty/posting.rb
.make_name(posting_type, dt) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/models/marty/posting.rb', line 10 def self.make_name(posting_type, dt) return 'NOW' if Mcfly.is_infinity(dt) return unless posting_type # If no dt is provided (which is the usual non-testing case), we # use Time.now.strftime to name the posting. This has the effect # of using the host's timezone. i.e. since we're in PST8PDT, names # will be based off of the Pacific TZ. dt ||= Time.now "#{posting_type.name}-#{dt.strftime('%Y%m%d-%H%M')}" end |