Coder Social home page Coder Social logo

Comments (4)

toxaq avatar toxaq commented on May 24, 2024 1

Well now I do feel silly... We are halfway through the Rails 6 upgrade so I must be confusing branches. Thank you for your responses, this gem and all the Evil Martians stuff you do. Big fan!

from store_model.

DmitryTsepelev avatar DmitryTsepelev commented on May 24, 2024

Hi @toxaq, I've just checked and Configuration.attribute_names should work perfectly fine. Doesn't it work in your case?

from store_model.

toxaq avatar toxaq commented on May 24, 2024

Hi @DmitryTsepelev, no, it's not working at my end. I'm using 0.8 of the gem. I cant think what would be different between our setups to cause this.

class Tenant::Location
  include StoreModel::Model

  attribute :address1, :string
  attribute :address2, :string
  attribute :suburb, :string
  attribute :city, :string
  attribute :state, :string
  attribute :postcode, :string
end

In console

=> Tenant::Location
irb(main):003:0> Tenant::Location.attribute_names
Traceback (most recent call last):
    1: from (irb):3
NoMethodError (undefined method `attribute_names' for Tenant::Location:Class)
Did you mean?  attribute_types
           attribute_alias
           attribute_aliases
           attribute_types=
           attribute_types?
irb(main):004:0> 

Thoughts on what I could check? We are still on Rails 5.2 if that matters.

from store_model.

DmitryTsepelev avatar DmitryTsepelev commented on May 24, 2024

Oh, Attributes API was a bit different in 5.2. There were no such public method, but maybe attribute_types will be helpful?

from store_model.

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.