Created
December 19, 2013 03:46
-
-
Save coreyjs/8034115 to your computer and use it in GitHub Desktop.
deserialize mutli params
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# deserialze tag params, idea is to check for tag save/change, always update to newest params | |
# find all tags associated with beacon, transform to array and return to the controller | |
def self.deserialize_tag_parameters(params) | |
if !params[:beacon][:tags].nil? | |
if !params[:beacon][:tags].empty? | |
code_array = params[:beacon][:tags].split(',') | |
logger.debug "Tag params parsed out" + code_array.to_s | |
tags = Tag.where(:code.in => code_array) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment