开发者

Model attributes aren't being set

开发者 https://www.devze.com 2023-03-26 08:03 出处:网络
The below log snippet shows the parameters that get passed in, but then when the SQLinsert statement is made it inserts nulls for all the values instead of the values in params. Can you guys give me s

The below log snippet shows the parameters that get passed in, but then when the SQL insert statement is made it inserts nulls for all the values instead of the values in params. Can you guys give me some ideas to debug this? I don't know where to start

Processing by CvitsController#create as HTML
  Parameters: {"commit"=>"Submit", "authenticity_token"=>"uRicLgLLkzSSB62b/bqefI0tQ2lR6UX8axKWBtM0dsU=", "utf8"=>"✓", "cvit"=>{"cluster_dist"=>"10000", "textup"=>">Glyma02g37330 RING finger family [Glycine max]\r\nMNMHKESPLIKLHSFDQGHAWLALLHLLIHVSPAVTGQPVTPPVQPDSNKSMVTIMAILAIMFLILVFLSIYSRKCYDRQAPTRGILDRADPTG\r\nAAGNPSQAESNGLNQATIETFPSFLYGDVKGLKIGKDTLACAVCLNEFEDDETLRMIPKCCHVYHRYCIDEWLGSHSTCPVCRANLVPQPED\r\nVNINTNIPSILSIQIPDEHEHEYEYETVVVGEEHKRGNVVESPKVNLLRRIRSLNHQSRPSRSRSTGFLSSLLFSRSNSLGQMQLAHNAAGENYE\r\nRFTLRLPEEVRSQMMLQRANSCVCFTRMSSGTWGYRTTRSAGRRCVQYERFGGGDDEGWGFTLTPPSLIRNGWNNNRSTRKSQRSGLVLD\r\nNNNADEKSSEFLPLG*", "filter"=>"T", "min_identity"=>"60", "e_value"=>"1e-10", "program"=>"blastp", "species"=>"glycine_max"}}
Creating sco开发者_如何学Pythonpe :page. Overwriting existing method Cvit.page.
  SQL (0.1ms)  BEGIN
  SQL (1.6ms)  describe `cvits`
  AREL (0.3ms)  INSERT INTO `cvits` (`cluster_dist`, `fileup_file_size`, `textup`, `fileup_file_name`, `filter`, `created_at`, `program`, `fileup_updated_at`, `species`, `min_identity`, `updated_at`, `e_value`, `fileup_content_type`) VALUES (NULL, NULL, NULL, NULL, NULL, '2011-08-05 13:50:07', NULL, NULL, NULL, NULL, '2011-08-05 13:50:07', NULL, NULL)
[paperclip] Saving attachments.
  SQL (121.3ms)  COMMIT
Redirected to http://soybase.org:8085/cvits/4
Completed 302 Found in 150ms

Model:

class Cvit < ActiveRecord::Base
  attr_accessor :species,:program,:textup,:e_value,:filter,:min_identity,:cluster_dist,:fileup_file_name
  attr_accessor :base_path, :fa_file, :text_file, :dbase, :source, :bl_file, :bl_sorted, :gff_file, :cvt_file, :db, :overlay_coords_gray

  def initilize(*args)
     super(*args)
  end

  def cvitSetup()
    .
    .
    .
  end
  def blast()
    .
    .
    .
  end
    .
    .
    .
end


change attr_accessor to attr_accessible

0

精彩评论

暂无评论...
验证码 换一张
取 消