What is this in rails? -


    create! |success, failure|             success.html { redirect_to admin_blogs_path }     end 

seems doing alot it....is part of rails

presuming being called in context of activerecord model, doesn't appear core. function of create! either create record or throw exception if failure occurs. such, failure block wouldn't execute.

what might wrapper around activerecord object used actioncontroller instance , handles states accordingly. may want see method defined in order better sense of it's doing.

one way track down mystery methods this:

raise method(:create!).source_location.inspect 

you'll array lists source file , source line if can resolved.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -