Skip to content
  • John Hawthorn's avatar
    4e6c8045
    Add test and change how format set in ActionMailer · 4e6c8045
    John Hawthorn authored
    Previously this used self.formats= to set the format which render would
    use to find templates. This worked, but was untested, and looked a
    little confusing because it was doing the mutation within a loop.
    
    This commit replaces the assignment with passing formats: [format] into
    the render call, which makes it more obvious that that's the purpose of
    the format. It also adds a test to verify the formats being used.
    4e6c8045
    Add test and change how format set in ActionMailer
    John Hawthorn authored
    Previously this used self.formats= to set the format which render would
    use to find templates. This worked, but was untested, and looked a
    little confusing because it was doing the mutation within a loop.
    
    This commit replaces the assignment with passing formats: [format] into
    the render call, which makes it more obvious that that's the purpose of
    the format. It also adds a test to verify the formats being used.
Loading