Public/images

Is there a reason that public/images isn’t overlaid into
engine_files/myengine/images the same way javascripts and stylesheets
are? Is there a way to turn it on?

-todd[1]

Hello,

I also created some images in a new public/images directory this
evening, and I was wondering if it would copy the images directory,
and… it did! I did not have to turn anything on. Of course you have
to restart webrick. If you’re using Apache, I already noticed that it
does not even copy/update the javascripts and stylesheets directory.

Bart

On 3/27/06, Bart M. [email protected] wrote:

Hello,

I also created some images in a new public/images directory this
evening, and I was wondering if it would copy the images directory,
and… it did! I did not have to turn anything on. Of course you have
to restart webrick. If you’re using Apache, I already noticed that it
does not even copy/update the javascripts and stylesheets directory.

Bart

Thanks Bart

I just needed a restart. I wonder why the directory wasn’t there to
begin with?

-todd[1]

When you start Rails (via a webserver or via the console), it will
copy everything underneath public/ in your engines into
subdirectories of the main RAILS_ROOT/public folder. If you make
changes to these files, you’ll have to restart your server (or console
process) to have them re-copied.

When running a webserver, you’ll need to make sure that the user which
your webserver runs as has permission to write files under /public.

  • james

On 3/27/06, Todd W. [email protected] wrote:

Thanks Bart

I just needed a restart. I wonder why the directory wasn’t there to begin with?

-todd[1]


engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

  • J *
    ~

Depending on what version of engines you are on, there are also some
helper
methods as well…

Engine_image
Engine_image_src

-Nb

On 3/27/06 3:09 PM, “James A.” [email protected] wrote:

Bart
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

  • J *
    ~

engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Nathaniel S. H. Brown                        http://nshb.net

At the moment, calling

Engines.copy_engine_files(Engines[:your_engine_name])

will do it. I’ll make it more convenient in the next release.

  • james

On 3/29/06, Subimage [email protected] wrote:

http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

  • J *
    ~

Quick, someone write a rake task that copies all public images/js/css
files over so I don’t have to…

Include it with the next version of engines too :smiley: