SyntaxFix
Write A Post
Hire A Developer
Questions
You can try something like this:
def details_to_json { :id => self.id, :credit_period_type => self.credit_period_type, :credit_payment_period => self.credit_payment_period, }.to_json end