How to return the result of Assets.at() in a controller method

229 views
Skip to first unread message

ibsdevs

unread,
May 31, 2012, 5:16:11 AM5/31/12
to play-fr...@googlegroups.com
Hi,

how can I return the result of Assets.at() in a Controller method. Following doesn't work for me:

Ok(Assets.at("images/svg/", id + ".svg"))

Thanks

Julien Richard-Foy

unread,
May 31, 2012, 5:27:01 AM5/31/12
to play-fr...@googlegroups.com
Remove the wrapping “Ok(…)”.

ibsdevs

unread,
May 31, 2012, 5:33:09 AM5/31/12
to play-fr...@googlegroups.com
Compiler returns following error:

[error]  found   : play.api.mvc.Action[play.api.mvc.AnyContent]                                                                                                                                                                                                                
[error]  required: play.api.mvc.PlainResult   

Julien Richard-Foy

unread,
May 31, 2012, 5:54:53 AM5/31/12
to play-fr...@googlegroups.com
Remove the wrapping “Action { … }”

Guillaume Bort

unread,
May 31, 2012, 6:00:45 AM5/31/12
to play-fr...@googlegroups.com
? I think that what you want is a Redirect

On Thu, May 31, 2012 at 11:54 AM, Julien Richard-Foy <j...@zenexity.com> wrote:
> Remove the wrapping “Action { … }”
>
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>



--
Guillaume Bort, http://guillaume.bort.fr
Reply all
Reply to author
Forward
0 new messages