Git Product home page Git Product logo

Comments (4)

gilbertojuniortelgo avatar gilbertojuniortelgo commented on June 19, 2024 1

No problem :)
Perfect.
Thanks a lot for the help.

from rummage_ecto.

thebugcatcher avatar thebugcatcher commented on June 19, 2024

Hi @gilbertojuniortelgo. Thanks for reaching out.
Looking at the above message I think it's the module you're calling rummage/2 from. rummage/2 is meant to be called from the model's module, not the application. So, MyApp.EctoModel.rummage/2.

Here is an example in the hex docs of Rummage.Ecto.

from rummage_ecto.

gilbertojuniortelgo avatar gilbertojuniortelgo commented on June 19, 2024

Worse than unsuccessful again.

Error:

(UndefinedFunctionError) function Rummage.Ecto.Myapp.rummage/2 is undefined (module Rummage.Ecto.Myapp is not available)

Model>

defmodule Myapp.Disp do
  use Myapp.Web, :model
  use Ecto.Schema
  use Rummage.Ecto


  schema "disps" do
    field :disponib, :float
    field :date, Ecto.Date
    belongs_to :city, Myapp.Local
    timestamps()
  end

  @doc """
  Builds a changeset based on the `struct` and `params`.
  """
  def changeset(struct, params \\ %{}) do
    struct
    |> cast(params, [:disponib, :date, :city])
    |> validate_required([:disponib, :date, :city])
  end

end

from rummage_ecto.

thebugcatcher avatar thebugcatcher commented on June 19, 2024

@gilbertojuniortelgo Sorry, if I wasn't clear earlier.

Based on the code you showed, you have to call rummage/2 function on the model itself (which is Myapp.Disp in your case). So you'll be doing something like this:

Myapp.Disp.rummage(rummage_params)

from rummage_ecto.

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.