Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfcomponent extends="Controller" output="false">
- <cffunction name = "init">
- <cfset Super.init() />
- </cffunction>
- <cffunction name = "remotesearch">
- <cfsetting showdebugoutput="false">
- <cfset provides("json")>
- <cfif IsDefined("params.term") and Len(Trim(params.term)) GT 0>
- <cfset locations = model("Location").findAll(where="zipcode LIKE '#params.term#%'", order="zipcode DESC", include="state")>
- </cfif>
- <cfset renderWith(locations)>
- </cffunction>
- </cfcomponent>
Add Comment
Please, Sign In to add comment