Posts by Eduardorph • 123 points
12 posts
-
0
votes1
answer41
viewsA: Update parent model when it is as nested Son
I found the solution Instead of @sale.customer.update(proposta_params) I should use @sale.update(proposta_params) and also missing the Customer "id" in the proposta_params method customer_attributes…
ruby-on-railsanswered Eduardorph 123 -
0
votes1
answer41
viewsQ: Update parent model when it is as nested Son
I am creating a system where the user creates a proposal, in the proposal form he must insert the data of the client that is in a separate table. This is working to create the proposal, but not to…
ruby-on-railsasked Eduardorph 123 -
0
votes2
answers40
viewsQ: Form with nested attribute and image upload
I have the following models class Campaign < ApplicationRecord has_many :questions validates_presence_of :name accepts_nested_attributes_for :questions end class Question < ApplicationRecord…
ruby-on-railsasked Eduardorph 123 -
1
votes2
answers3258
viewsA: Point domain to a Docker container with apache
I was able to find a solution Follows: 1 - First let’s create a container and install Apache in it, this container will respond on port 80 of the same server and we will give the name of APACHE…
-
2
votes2
answers3258
viewsQ: Point domain to a Docker container with apache
Talk personal, I’m starting to use Docker, but I still have many questions and one of them is how to point a domain to a specific container. First I created a Container with a php and apache image…
-
1
votes2
answers302
viewsQ: Should I create a container for each site/app or can I put them all in the same one?
I’m starting to study Docker, I’ve been playing a little bit on a VPS server that I have, but still some doubts persist. I already understood that it is good practice to separate the database and…
-
1
votes1
answer85
viewsQ: Ruby and PHP in the same VPS
I’m considering the idea of hiring a VPS at Linode to host different projects. The point is that some of them are in PHP and others in Rails. My question is: It is possible to configure a VPS to run…
-
4
votes1
answer158
viewsQ: Format values from one array into another
I have a CSV that returns me the following array: Array ( [0] => Array ( [0] => ANO [1] => Sciences [2] => Mechanics [3] => Telecom ) [1] => Array ( [0] => 2001 [1] => 226…
-
1
votes1
answer348
viewsQ: How to add elements to an array
Come on guys, I’m sure it’s a very simple question, but I can’t do it. First scenario - I have the following array: $century = array( 'decade' => array( array( 'year' => '2017', 'months' =>…
-
1
votes1
answer263
viewsQ: BD modeling for "multi-level marketing"
Personal talk, I’m working on an app that consists of people referral, same as so-called multi-level marketing. The general idea consists of: Person A indicates person B (LEVEL 1) if person B…
-
0
votes1
answer75
viewsQ: Field select duplicating with Chosen-Rails and relationship has Many through
Personal talk, I have a GROUP_TV table and it relates to the City table through has Many through. In the _from.html.erb view of GROUP_TV, I have a collection_select to select as many cities as I…
-
1
votes1
answer1568
viewsQ: Configure git on a shared hosting
I have a shared hosting at hostgator and in the description of the plans I saw which git client is accepted. I contacted Hostgator support to better understand the details of the git client they…