0

I have 2 models ( generator + result). (Generator has_many results) (Result belongs_to Generator ).

I want to have a single form whereby i can ask user to give me the values. some of the value that user give , are to be used as params which will be used in my function defined in my Models.

Example : Generator/_form

User will select 1 of the selection , and then the final output would be a random_primner_generated. For example, user chosed Randomly and give 7 as the Primer Length. It will then call a function (random_generate) defined in Generator model.

Result/_form This is the part whereby the program will extract sequences from a database called NCBI and store the values in 1 of the Result attribute ( genome_seq) .It then uses the random_primer_generated attribute (@generator.random_primer_generated) generated by the above function (random_generate) and compare how many times does @generator.random_primer_generated match with genome_seq. ( some sort like ctrl+F to find how many matches we have in a long words )

My question is how can i combine both this forms as one.

4

0 回答 0