Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create
- @residence = Residence.new(params[:residence])
- @address = Address.new(params[:address])
- @residence.address = @address
- respond_to do |format|
- if @residence.save
- format.js
- else
- format.html render "new"
- end
- end
- end
Add Comment
Please, Sign In to add comment