Comments (5)
I had the same issue. Found a workaround by calling Rummage.Ecto.rummage/2
directly. e.g.
# Phoenix 1.3.0
# In the context file
# lib/app_name/company/company.ex
def list_members(rummage_params) when is_nil(rummage_params) do
list_members(%{"paginate" => %{}, "search" => %{}, "sort" => %{}})
end
def list_members(rummage_params) do
{query, r} = Member
|> Rummage.Ecto.rummage(rummage_params)
# IO.puts inspect(r)
members = query
|> Repo.all
{members, r}
end
Controller file:
# lib/app_name_web/controllers/company_controller.ex
def index(conn, params) do
{members, rummage} = Company.list_members(params["rummage"])
render(conn, "index.html", members: members, rummage: rummage)
end
from rummage_phoenix.
I don't think your issue is related to Phoenix 1.3 and Elixir 1.5.1. I have a Phoenix 1.2.1 and Elixir 1.2 app that gets the same error with Rummage-Phoenix 1.2. I do not get the error with Rummage-Phoenix 1.0 on either version of Phoenix which leads me to believe the issue is with Rummage-Phoenix 1.2.
from rummage_phoenix.
Hi, guys. I've a problem getting rummage to run for phoenix 1.3. Need your help/assist
Phoenix: 1.3
Elixir: 1.5.2
Error:
Failed to use "phoenix" (version 1.3.0) because
apps/admin_web/mix.exs requires ~> 1.3.0
apps/api/mix.exs requires ~> 1.3.0
guardian (version 1.0.0-beta.1) requires ~> 1.0 or ~> 1.2 or ~> 1.3
phoenix_live_reload (version 1.1.2) requires ~> 1.0 or ~> 1.2 or ~> 1.3
phoenix_slime (version 0.8.0) requires ~> 1.2
rummage_phoenix (version 1.2.0) requires ~> 1.2.1
mix.ex
{:rummage_phoenix, "~> 1.2.0", override: true}
from rummage_phoenix.
Hi @fadzril. Looks like you can get around it by using {:phoenix, "~> 1.3.0", override: true}
. Full support for phoenix 1.3
is a work in progress in #37 and #42. I have been thinking about the route rummage_phoenix
should take due to drastic changes in Phoenix 1.3 and expected changes in 1.4.. So, a full compatibility with phoenix 1.3 and above might take a while..
@devilankur18 and @thebrianemory Rummage Ecto doesn't support __using__
macro anymore. I would recommend importing it into your ecto schema or using it like @ziazek has shown above..
I have been meaning to update rummage documentation and blogs to reflect that, but I guess I am waiting for a full compatibility with phoenix 1.3..
from rummage_phoenix.
Thanks for replying and help @aditya7iyengar . Manage to solve deps issues and encounter same problem above, I guess I should follow @ziazek steps.
Again, thanks for the help and building this. It helps a lot
from rummage_phoenix.
Related Issues (20)
- function nil.all/1 is undefined or private HOT 2
- Use a standard form and do mapping of terms to search params in the controller
- sort_link assumes index HOT 1
- switch to using Macro.camelize
- should be able to configure usage of an existing atom
- fix double- `<a>` rendering HOT 1
- Let controller handle association and hidden fields
- Search by custom fragments
- Sort links do not work on show page
- Provide override for search form on what page to submit
- whitelist searchable fields
- Select field in search form HOT 2
- protocol Ecto.Queryable not implemented HOT 1
- support action: in sort_link HOT 1
- Unable to run in Phoenix 1.3 HOT 13
- Update LICENSE to Annkissam HOT 1
- Search by two fields with the same name (one for model, one for association) HOT 1
- Collection count greater than per_page, Query never returns null?
- Live View support
- ** (KeyError) key :paginate not found in: %{"paginate" => %{}, "search" => %{}, "sort" => %{}}
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rummage_phoenix.