Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 19th, 2012  |  syntax: Rails  |  size: 0.72 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. def require_one_blog_per_owner                                                          |~                                                                                        
  2.     if current_blogger.has_blog?                                                          |~                                                                                        
  3.       flash[:error] = "You can't create more than one blog"                               |~                                                                                        
  4.       redirect_to(root_path)                                                              |~                                                                                        
  5.     end