Viktor Nacht
2018-09-29 18:16:03 UTC
So I have a simple hash:
{ a => 'b', b => 'c' }
That I would like to turn into params per the
Mojolicious::Plugin::TagHelpers docs:
You can also use "param" in Mojolicious::Plugin::DefaultHelpers to set them
could write a helper to copy the hash over one param at time, but I was
wondering if there was a more elegant way to do it. For example, is there a
way to access the Mojo::Parameters append method from the controller?
{ a => 'b', b => 'c' }
That I would like to turn into params per the
Mojolicious::Plugin::TagHelpers docs:
You can also use "param" in Mojolicious::Plugin::DefaultHelpers to set them
manually and let necessary attributes always be generated automatically.
It appears $c->param can only set one parameter at a time. Obviously Icould write a helper to copy the hash over one param at time, but I was
wondering if there was a more elegant way to do it. For example, is there a
way to access the Mojo::Parameters append method from the controller?
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.