Sha256: 45e55ed0155ae8fd9fb1099da9d35061c6574eb4ca2c4cf501b64f43caf7b371

Contents?: true

Size: 965 Bytes

Versions: 2

Compression:

Stored size: 965 Bytes

Contents

FileManagerEngine
=================

Rails 3 engine to track used files elsewhere your models

Install
=================

Use
=================

You need add this lines to used FileManager in your app:

<pre><code>
<p>include 'FileManagerEngine"</p>
<p>self.file\_field\_name = [name field]</p>
</code></pre>

name_field is refered to name the field or scope how you used to relationated the entity with the file or files included in the instance to save.

Examples:

If a new post used a file image called "foto.jpg" and Post entity has a field called "image\_id" to refered with this image file, then you self.file\_field\_name = :image\_id

Other case, if you don't have a entity to admin files, and you insert a files by their path and the post entity has a field called "path" you self.file\_field\_name = :path.

In conclusion, this params is used to search the file when you need to delete it and search the relation with the rest of entities in your model.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
file_manager_engine-0.0.2 README.md
file_manager_engine-0.0.1 README.md