What is the difference? Also, why does this not work:
The variables such as base_path are not being set.
class Cvit < ActiveRecord::Base
attr_accessible :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()
self.base_path = "blast_cvit/"
self.fa_file = "input.fa"
.
.
end
end
in the rails console the attributes get set correctly however when I try to do this:
controller:
def show
@cvit = Cvit.find(params[:id])
@cvit.cvitSetup()
@cvit.blast()
@cvit.generateGff()
@cvit.generateCvitImage()
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @cvit }
end
end
and in my view I reference @cvit.some_attribute.html_safe but that attribute is null so I get an error. Any ideas?