I believe it is because the file inputs are bound to the media_attributes
property of the template model.

On May 21, 2014, at 8:16 PM, Zach Rowe <notifications@github.com> wrote:

In app/controllers/templates_controller.rb:

> @@ -41,6 +41,8 @@ def new
>    def edit
>      @template = Template.find(params[:id])
>      auth!
> +    # make sure that we only have two html file inputs, one for the graphic ("original") and one for the stylesheet ("css")
> +    @template.media.reject! {|m| true}

but #edit is just loading the template for display, I'm not seeing why it
needs empty media objects

—
Reply to this email directly or view it on
GitHub<https://github.com/concerto/concerto/pull/925/files#r12934412>
.