Skip to content

Instantly share code, notes, and snippets.

@beneggett
Forked from anonymous/2.txt
Created November 12, 2012 17:45
Show Gist options
  • Save beneggett/4060792 to your computer and use it in GitHub Desktop.
Save beneggett/4060792 to your computer and use it in GitHub Desktop.
Error CONNECTION REFUSED
def create_url
country = Country.where(:name => params[:country]).first
@wine = Wine.create(
:name => params[:name],
:country => BSON::ObjectId.from_string(country.id.to_s),
:region => params[:region],
:varietal => params[:varietal],
:producer => params[:producer],
:wine_type => params[:wine_type],
:year => params[:year],
:content => params[:content],
:savin => params[:savin]
)
respond_with @wine
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment