The code below that makes sure there are two empty associations for the
file inputs.

On May 21, 2014, at 7:05 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 it doesn't make sure there are two files, as proclaimed. It summarily
deletes the media objects

—
Reply to this email directly or view it on
GitHub<https://github.com/concerto/concerto/pull/925/files#r12933347>
.