Created
February 15, 2016 15:58
-
-
Save costajob/d763cd22026f062babb0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def stores_for_user | |
@stores = OsaUser.find_all_by_user(params[:user]). | |
map{|x| [x.store_code, x.store_description]}.uniq unless params[:user].blank? | |
respond_to do |format| | |
format.json { render :json => @stores} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment