Guest User

Untitled

a guest
May 27th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. # add to every applicable model
  2. def self.get_paths
  3. path_ar = []
  4. self.find(:all).each do |model|
  5. path_ar << {:url => "/#{model.class.name.downcase.pluralize}/#{model.to_param}", :last_mod => model.updated_at.strftime('%Y-%m-%d')}
  6. end
  7. path_ar
  8. end
Add Comment
Please, Sign In to add comment