Parameters are available only to you in the controller.
However, you can pass parameters as a parameter from the controller to the model. If you used a controller action called "create":
def create
ClassName.generate_result(params)
...
end
and your model method might look like this:
def generate_result(params)
self.ncbi_ref_seq=params[:ncbi_ref_seq]
Bio::NCBI.default_email = "[email protected]"
fasta_sequence= Bio::NCBI::REST::EFetch.nucleotide(@result.ncbi_ref_seq,"fasta")
fasta=Bio::FastaFormat.new(fasta_sequence)
self.genome_seq = fasta.data
self.genome_sample = fasta.definition
end
You can use something more descriptive than "params", but this is a general approach.