Giter Site home page Giter Site logo

Comments (7)

coneybeare avatar coneybeare commented on May 19, 2024

this is not the problem actually, non-namespaced controllers are not getting the method either, despite "AbstractController::Rendering.send :include, ActsAsApi::Rendering" being called

from acts_as_api.

coneybeare avatar coneybeare commented on May 19, 2024

I fixed it temporarily by explicitly adding the include into the application controller. Do you have any idea why the gem include would fail?

require 'acts_as_api'
class ApplicationController < ActionController::Base
include ActsAsApi::Rendering

from acts_as_api.

fabrik42 avatar fabrik42 commented on May 19, 2024

At the moment the including of acts_as_api is a little bit quirky.

The gem is broken since the Rails3 rc. So I think I will have to rework the include process, maybe by using the plugin methods of rails 3: http://edgeguides.rubyonrails.org/plugins.html#add-an-acts_as-method-to-active-record

from acts_as_api.

coneybeare avatar coneybeare commented on May 19, 2024

If this is the only way then ok, but if we can do it gem-wise, it would give users more options.

from acts_as_api.

fabrik42 avatar fabrik42 commented on May 19, 2024

I fixed the problem this morning.
Instead of including ActsAsApi::Rendering method into the AbstactController::Rendering I included it directly in ActionController::Base

from acts_as_api.

coneybeare avatar coneybeare commented on May 19, 2024

great!

from acts_as_api.

fabrik42 avatar fabrik42 commented on May 19, 2024

should work with the 0.2.1 gem version again! please note that you have to update your code, because you have to mention an api template now!

from acts_as_api.

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.