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 #<ActiveModel::Name #484

Closed
rchady opened this issue Mar 28, 2016 · 6 comments
Closed

undefined method `constantize' for #<ActiveModel::Name #484

rchady opened this issue Mar 28, 2016 · 6 comments

Comments

@rchady
Copy link

rchady commented Mar 28, 2016

Trying to create a search and I'm getting the error:

ActionView::Template::Error (undefined method `constantize' for #<ActiveModel::Name:0x00000004c85420>):
    4:   <%= javascript_tag do %>
    5:     if (window.Ransack == null) { window.Ransack = {}; }
    6:     Ransack.alt_predicates_i18n = <%= I18n.translate(:"ransack.predicates.alt", :default => {}).to_json.html_safe %>;
    7:     Ransack.value_field_labels  = <%= f.labels_for_value_fields.to_json.html_safe %>
    8:   <% end %>
    9:
   10:   <div class="row">
  app/views/entities/_search.html.haml:16:in `_app_views_entities__search_html_haml___3032588275568370446_48025820'
  app/views/opportunities/index.html.haml:7:in `_app_views_opportunities_index_html_haml___1509649107143017558_70179435086900'
  app/controllers/entities/opportunities_controller.rb:16:in `index'

This seems to come out of the ransack_ui gem as far as I can tell.

@steveyken
Copy link
Member

Thanks for reporting. Seems to be related to fatfreecrm/ransack_ui#7 as you noted. What steps did you take to reproduce on FFCRM?

@rchady
Copy link
Author

rchady commented Mar 29, 2016

Fresh install of FFCRM, created a personal list, saved it... and BOOM! It seems to do the save, because the list entry shows up, but clicking on it any time will hit the error.

@rchady
Copy link
Author

rchady commented Apr 7, 2016

Is there any update on this? Or a workaround I could do for now? I dug in to ransack_ui but did not see any obvious place where #constantize was being called on the wrong thing.

@stanleylhs
Copy link
Member

@rchady I can't reproduce this error from the current master branch.

Here are my steps:
Do an advance search, save it in My Lists, then click on the newly created list.

Is this the right steps to reproduce the error?

@johnnyshields
Copy link
Contributor

@rchady can you confirm if the issue persists on latest master? Otherwise we'll close it.

@johnnyshields
Copy link
Contributor

Please reopen if issue persists.

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