When using ActiveScaffold, I had problems overriding conditions_for_collection from a module. The problem was that even tho I was overriding the instance method conditions_for_collection in the FilterFormExtensions module, I was including (using "include FilterFormExtensions") the module before inserting the activescaffold into the controller (using the active_scaffold method). Any active scaffold method that you want override using a module, make sure you include the module after inserting the active scaffold. Of course if you declare the method as an instance method of your controller, the method will be overridden regardless of whether is before or after inserting the active scaffold.
The following Powershell script will convert a batch of JPEG files to TIFF format: #This Code is released under MIT license [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") $files_folder = 'C:\path-where-your-jpg-files-are\' $pdfs = get-childitem $files_folder -recurse | where {$_.Extension -match "jpg"} foreach($pdf in $pdfs) { $picture = [System.Drawing.Bitmap]::FromFile( $pdf.FullName ) $tiff = $pdf.FullName.replace('.PDF','').replace('.pdf','').replace('.jpg','').replace('.JPG','') + '.tiff' $picture.Save($tiff) }
Comments