Created
June 5, 2012 16:13
-
-
Save PeteMichaud/2876001 to your computer and use it in GitHub Desktop.
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
def show | |
begin | |
@company = Company.find params[:id].to_i | |
rescue ActiveRecord::RecordNotFound | |
#do nothing | |
end | |
if @company.present? | |
@vendors = @company.vendors | |
end | |
respond_to do |format| | |
format.js {render json: @vendors, content_type: 'text/json'} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment