Guest User

Untitled

a guest
Jun 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #This works
  2. News.create ( :title => titles[1].to_s.gsub(/<\/?[^>]*>/, "").strip )
  3.  
  4.  
  5. titles.each do |t|
  6.  
  7. #This does not - "slug.name can not be blank."
  8. News.create ( :title => t.to_s.gsub(/<\/?[^>]*>/, "").strip )
  9.  
  10. end
Add Comment
Please, Sign In to add comment