Comments (4)
No problem :)
Perfect.
Thanks a lot for the help.
from rummage_ecto.
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.
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.
@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)
- Using rummage search with jsonb HOT 3
- searching on a boolean column is raising an exception HOT 3
- default config not loaded HOT 2
- Resolve each search field individually for better usage
- white list searchable fields
- search - begins_with and ends_with
- Search operation, the total_count that is taken is not in conformity with the actual
- How to add search items in search HOT 1
- Clean up junk in schema and replace with rummage_field DSL.
- Mix error when installing. HOT 2
- Add better docs for new features in 2.0
- Update LICENSE to Annkissam
- Should this be updated to Annkissam? HOT 1
- Upgrade instructions from 1.0 -> 2.0
- FunctionClauseError error HOT 5
- Search Schema by field and field in the assoc HOT 4
- Doesn't work with string keys in rummage.
- Upgrade Support for Ecto 3.0 HOT 2
- search_type: :eq
- Configuration options - Pagination
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_ecto.