Code Monkey home page Code Monkey logo

zoho-crm's People

Contributors

dependabot[bot] avatar djtal avatar flam avatar robertaudi avatar

zoho-crm's Issues

Setting a static value for a model's field affects all instances of the model

If we set the static value of a model's field, then all instances of that model will use the static value:

User = Struct.new(:email)

class Contact < ZohoCRM::Model
  zoho_field(:email, as: "Email")
end

user = User.new("[email protected]")
contact1 = Contact.new(user)
contact2 = Contact.new(user)
contact2.email = "[email protected]"

contact1.field(:email).value_for(user) # => "[email protected]"
contact2.field(:email).value_for(user) # => "[email protected]"

In the example above, contact1.field(:email).value_for(user) should be [email protected].

Add type checking using Sorbet

Sorbet is a fast, powerful type checker designed for Ruby.

There is also a project to convert YARD docs to Sorbet signatures:

Sord: Generate Sorbet RBI files from YARD docs:

Find a field by its API name

Right now it's only possible to find a field by its name attribute. It would be really useful to be able to find a field by its api_name attribute.

Allow computable field labels

Right now the label of a field is specified when the field is created and its value is static:

field = ZohoCRM::Fields::Field.new(:full_name, label: "Full name (First name + Last name)")
puts field.label # => Full name (First name + Last name)

It would be better to be able to assign to the label an object that responds to #call and be able to compute it with #label_for โ€“ similar to the #value_for method.

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.