Giter Club home page Giter Club logo

Comments (10)

dlitvakb avatar dlitvakb commented on August 10, 2024

Hey @sebbean,

Which version of contentful_model and of the contentful gem are you using?

Cheers

from contentful_rails.

sebbean avatar sebbean commented on August 10, 2024
GIT
  remote: https://github.com/sebbean/contentful_rails.git
  revision: 201881d32d0b099acb51f59c882f23c5afd005eb
  branch: patch-1
  specs:
    contentful_rails (0.3.0)
      contentful_model (>= 0.1.7)
      rails (>= 4.1.8)
      redcarpet (~> 3.2)

from contentful_rails.

dlitvakb avatar dlitvakb commented on August 10, 2024

Hey @sebbean,

Could you try updating to contentful_model ~> 0.2. That may fix your issue.

If not, I'll take another look into it.

Cheers

from contentful_rails.

sebbean avatar sebbean commented on August 10, 2024

Why not update the gemspec to use that higher model version? gem 'contentful_rails' doesnt have any way of specifying the contentful_model version.

Updating the gemspec in my branch:
@dlitvakb #27

from contentful_rails.

sebbean avatar sebbean commented on August 10, 2024

contentful_model features seem to be busted:
I can access data with model.fields[:relation].map(&:resolve) but it doesnt do any of the things that contentful_model supposedly provides.

screen shot 2017-02-06 at 3 08 57 pm

screen shot 2017-02-06 at 3 09 47 pm

from contentful_rails.

sebbean avatar sebbean commented on August 10, 2024

screen shot 2017-02-06 at 3 27 36 pm

from contentful_rails.

sebbean avatar sebbean commented on August 10, 2024

seemed to fix the issue by removing version constraints from gemspecs.

this is how I am able to use these gems successfully:

gem 'contentful_model', github: 'sebbean/contentful_model', branch: 'patch-1'
gem 'contentful_rails', github: 'sebbean/contentful_rails', branch: 'patch-1'

from contentful_rails.

sebbean avatar sebbean commented on August 10, 2024

eh, doesnt really work actually. just loaded the correct classname using the fields[:relationship].map(&:resolve) hack

from contentful_rails.

dlitvakb avatar dlitvakb commented on August 10, 2024

Thanks for digging into this,

Regarding contentful/contentful_model#56 I just made a comment there.

Cheers

from contentful_rails.

sebbean avatar sebbean commented on August 10, 2024

My issue was actually wrongly set default_locale

I had:
config.default_locale = :en

noticed i should have had:
config.default_locale = 'en-US'

from contentful_rails.

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.