/wheels/tests/_assets/models/TagWithDataCallbacks.cfc

http://cfwheels.googlecode.com/ · ColdFusion CFScript · 20 lines · 16 code · 4 blank · 0 comment · 0 complexity · 9eb76bf97572c14bfbbed08e601dcbfe MD5 · raw file

  1. <cfcomponent extends="Model">
  2. <cffunction name="init">
  3. <cfset table("tags")>
  4. <cfset afterCreate("createWelcomePost")>
  5. </cffunction>
  6. <cffunction name="createWelcomePost">
  7. <cfset var objPost = model("Post").create(authorId=1, title="Welcome", body="This is my first post", views=0)>
  8. <cfif IsObject(objPost)>
  9. <cfreturn true>
  10. </cfif>
  11. <cfreturn false>
  12. </cffunction>
  13. <cffunction name="crashMe">
  14. <cfset var foo = 1 / 0>
  15. </cffunction>
  16. </cfcomponent>