Skip to content
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 method sending in generate_payload if they match schema field names #70

Open
DeeChau opened this issue Jun 8, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@DeeChau
Copy link
Collaborator

DeeChau commented Jun 8, 2020

When an ActiveRecord class has a method with the same name as a field in the schema, the generate_payload method should be able to populate the payload with that field.

An example of this is when initial is a field in the kafka schema, there should be no additional code to add to generate_payload

class Widget < ApplicationRecord
  # Quite literally the first letter of the name
  def initial
    name.first
  end
end
# == Schema Information
#
# Table name: widgets
#
#  name   :string(6)        not null, primary key
@dorner dorner changed the title Support helper_methods in generate_payload if they match schema field names Support method sending in generate_payload if they match schema field names Jun 8, 2020
@dorner dorner added the enhancement New feature or request label Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants