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
Post a Comment