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

undefined method `constantize' for Post:ActiveModel::Name #93

Open
canedy opened this issue Oct 20, 2013 · 10 comments
Open

undefined method `constantize' for Post:ActiveModel::Name #93

canedy opened this issue Oct 20, 2013 · 10 comments

Comments

@canedy
Copy link

canedy commented Oct 20, 2013

i'm getting the following error when i attempt to retrieve records from Parse.

code example.

def index
    @posts = Post.find_all_by_author("Zedd").first
end

Error:

undefined method `constantize' for Post:ActiveModel::Name

@foscomputerservices
Copy link

Yes this problem is what I encountered in issue #87. You can find a manual solution in that bug report.

@canedy
Copy link
Author

canedy commented Oct 20, 2013

That resolved my issue. Now I assume i have to put the to_s everywhere i see "constantize" being used. So far i have found it in the following areas.

query.rb
base.rb
parse_user.rb

also, for anyone else reviewing thread remember to restart server after you make changes.

@canedy canedy closed this as completed Nov 1, 2013
@kapso
Copy link

kapso commented Dec 1, 2013

I am having the same issue with rails 4. What I am hearing is that everyone needs to add to_s to the gem code? This cant possibly be a long term solution, where each developer is changing their own gem code?

@canedy
Copy link
Author

canedy commented Dec 1, 2013

I know the base.rb was merged back in oct. #95.

@canedy canedy reopened this Dec 1, 2013
@adelevie
Copy link
Owner

adelevie commented Dec 1, 2013

Hey sorry for losing track of this. Does I need to cut a new gem release from master?

@kapso
Copy link

kapso commented Dec 1, 2013

Yea probably a gem release is needed. Also an FYI - I tried the master branch and as a result one of my parse queries goes into this endless loop. The same query works fine with version 1.8.0

@adelevie
Copy link
Owner

adelevie commented Dec 1, 2013

Since I'm not actively using parse_resource, would any of you like
commit/gem release access? I'm sure you could be much more responsive than
I am.

On Sun, Dec 1, 2013 at 1:52 PM, Kapil [email protected] wrote:

Yea probably a gem release is needed. Also an FYI - I tried the master
branch and as a result one of my parse queries goes into this endless loop.
The same query works fine with version 1.8.0


Reply to this email directly or view it on GitHubhttps://github.com//issues/93#issuecomment-29580088
.

@kapso
Copy link

kapso commented Dec 1, 2013

So between this gem & parse-ruby-client which one is more actively maintained and recommended?

@adelevie
Copy link
Owner

adelevie commented Dec 1, 2013

I've always hoped that they both could exist side-by-side. I started parse_resource, and then took over parse-ruby-client at a very early stage of its development. parse_resource is meant to be easier to use with Rails and take's a much more OO approach.

parse-ruby-client has IMO an easier to understand code base, and could be great with things like Sinatra, or simple back-end scripts for manipulating mobile app data.

Whichever one you use should probably be decided by what type of API you desire: something more like ActiveRecord, or something much more minimalist. Do you like writing Rails code, or Ruby code?

Both projects are fairly mature, but since I'm not using either of them at the moment (this can change, though!), it's tough to actively develop and maintain. I know that @jamonholmgren has done a great job helping take care of parse_resource, but any new help would be appreciated by me, and everyone else who is using the gem.

@kapso
Copy link

kapso commented Dec 1, 2013

Thanks for your response, that clears it up on what gem to use and when. Seeing some other Rails 4 issue. I have opened it here #101

We are using Parse temporarily for now until we move to our own backend, so not sure if I would have time/resources to give.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants