def set_name
    deal_date = self.deal_date
    if (4..12).to_a.include?(self.deal_date.month)
...

Ruby Refactor this code

by https://www.google.com/accounts/o8/id?id=AItOawl-DJ5xgYVFKrrLOGZqwCiGLkx38LeB1cU, November 10, 2011 21:43, No refactoring, tagged with ruby, rails3

Please refactor this code.....

55502f40dc8b7c769880b10874abc9d0 Talk
def create
    @lead = Lead.new(params[:lead])
    @contact = @lead.contact_detail = ContactDetail.new(params[:contact_detail])
...

Ruby Best way to do this

by https://www.google.com/accounts/o8/id?id=AItOawl-DJ5xgYVFKrrLOGZqwCiGLkx38LeB1cU, April 28, 2011 00:08, 6 refactorings, tagged with controller, rails3

Thanks

55502f40dc8b7c769880b10874abc9d0 Talk