On 27 April 2015 at 09:42, Padmahas Bn <padma...@gmail.com> wrote:
> class Recovery < ActiveRecord::Base
>   def self.processrecovery
>     @members = Member.where(record_status: "1")
>     @members.each do |member|
>       tmemberCode = member.member_code
>       :
>       :
>       :# Processing of data from different database
>       :
>       :
>      # Variables containing processed data
>      interest_to_be_paid
>      pInstallmentAmt = tPersonalLoanBalAmt * tpersonalintrate / (100 * 12)
>      jInstallmentAmt = tJointLoanBalAmt * tjointintrate / (100 * 12)
>   end
> end
>
>
> Now how can I insert these processed data into recoveries table?
> Should I user
>
> Recovery.create(interest: => interest_to_be_paid, p_installement: =>
> pInstallmentAmt,.....)
>
> inside recovery.rb (model) itself?

Why not?  Presumably inside processrecovery.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuZO4gES3qFO17aSwQ4U_Wm0M0P0tnSK2BQr1vm5SBEyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to