-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for virtual fields #2658
base: main
Are you sure you want to change the base?
Conversation
53f50e0
to
92f01f3
Compare
Thank you for this. I hope I can remember things clearly, let's see what we can do here... 👀
|
92f01f3
to
f3f53c2
Compare
f3f53c2
to
f377679
Compare
@pablobm |
This is for compatibility reasons. module Administrate
module Field
class Base
def initialize(attribute, _data, page, options = {})
@attribute = attribute
@page = page
@resource = options.delete(:resource)
@options = options
@data = read_value
end Should I fix all the RSpec tests? |
I believe this case should not be an issue. For custom fields, you can override read_value to fetch data and format it using any method you prefer. |
Support for virtual fields, based on #1586.
Usage
(Note: The Sortable implementation has been split into #2659.)
What do you think? I'll make any necessary changes.
Please review it.