X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Static-Simple.git;a=blobdiff_plain;f=README;h=65e71419f0c105ab1932a996db2add75ba5a2c33;hp=91f60c3b703c7e2984dc92a45422db685b0e4f41;hb=6cc495c42c41e0a7a07b4e52a73f61b4077c957f;hpb=ab02ca0d1f663f389eef9d4b000c05392304c06a diff --git a/README b/README index 91f60c3..65e7141 100644 --- a/README +++ b/README @@ -172,6 +172,20 @@ USING WITH APACHE application, and it will continue to function on a development server, or using Catalyst's built-in server. +PUBLIC METHODS + serve_static_file $file_path + Will serve the file located in $file_path statically. This is useful + when you need to autogenerate them if they don't exist, or they are + stored in a model. + + package MyApp::Controller::User; + + sub curr_user_thumb : PathPart("my_thumbnail.png") { + my ( $self, $c ) = @_; + my $file_path = $c->user->picture_thumbnail_path; + $c->serve_static_file($file_path); + } + INTERNAL EXTENDED METHODS Static::Simple extends the following steps in the Catalyst process. @@ -199,7 +213,11 @@ AUTHOR Andy Grundman, CONTRIBUTORS - Marcus Ramberg, Jesse Sheidlower, + Marcus Ramberg, + + Jesse Sheidlower, + + Guillermo Roditi, THANKS The authors of Catalyst::Plugin::Static: