shotleybuilder
Protocol Phoenix.Param not implemented for []. This protocol is implemented for: Any, Atom, BitString, Integer, Map
Hi
A curious error has arisen in a previously functional piece of code. I have a route that looks like this:
get "/:type/:year/:number", MyController, :show
I’ve been using this path helper successfully for ages:
<%= link( to: my_path( @conn, :show, type, year, number ) ) do %>
But now it throws the above error. I’ve commented out the line so I know it’s the offending clause. I’ve also upgraded to 1.4 so it now looks like
<%= link( to: Routes.my_path( @conn, :show, type, year, number) ) do %>
Same error.
This will be super simple fix I’m sure …
Marked As Solved
shotleybuilder
I’ve rehashed the routes and given them unique defs in the controller. Think it’s fixed!
#Routes.my_path helper
#contents
get "/:type/:year/:number/contents", MyController, :contents
#section
get "/:type/:year/:number/section/:section_number", MyController, :section
#group
get "/:type/:year/:number/group/:group_number", MyController, :group
#part
get "/:type/:year/:number/part/:part_number/chapter/:chapter_number", MyController, :part_chapter
get "/:type/:year/:number/part/:part_number", MyController, :part
#schedule
get "/:type/:year/:number/schedules", MyController, :schedules
get "/:type/:year/:number/schedule/:schedule_number/paragraph/:paragraph_number", MyController, :schedule_paragraph
get "/:type/:year/:number/schedule/:schedule_number", MyController, :schedule
#whole
get "/:type/:year/:number", MyController, :show
Also Liked
OvermindDL1
For note, that generally happens when a call became ambiguous (parameter count changed), in which case following it up with an empty parameter arg fixes it and makes it unambiguous. ![]()
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









