Giter Club home page Giter Club logo

Comments (5)

ziazek avatar ziazek commented on May 22, 2024 2

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.

thebrianemory avatar thebrianemory commented on May 22, 2024

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.

fadzril avatar fadzril commented on May 22, 2024

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.

thebugcatcher avatar thebugcatcher commented on May 22, 2024

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.

fadzril avatar fadzril commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.