Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

auto_link method does not seem to work in production rails #74

Closed
torrick opened this Issue · 6 comments

5 participants

@torrick

I used the auto_link method in a few of my models and everything works in development mode but when switching to production the auto_link method no longer returns a link. Link_to seems to work just fine.

@lenary

I'm pretty sure auto_link no longer exists in rails 3.1. you may need a plugin for it. If you're not on 3.1, disregard this message

@gregbell gregbell was assigned
@gregbell
Owner

Active Admin overrides the auto_link method so it should be available to you in any version of Rails. I'm going to mark this as a bug and get it fixed for the next release.

Could you post the code your using in a gist?

@mattvague
Collaborator

@fractur3d Can't reproduce this so far. Do you still have this problem? What version of Rails are you using?

@nasa42

OK, it also happened with me and I've been able to semi-figure out the problem.

The problem is that for the second request to server, line 102 of this file returns nil, because object_id of model classes have changed for second request and so resources.values.find() fails as resources.values.map(&:resource) returns an array that refers to older object_id of same model classes.

https://github.com/gregbell/active_admin/blob/v0.3.3/lib/active_admin/namespace.rb#L102

This is probably closely related to issues #707 and #170.

I'm using plain old WEBrick in development environment with Rails 3.1.1, Ruby 1.8.7 and ActiveAdmin 0.3.3.

@gregbell
Owner

This is working in production for us now. Please re-open if it becomes an issue again.

@gregbell gregbell closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.