What's the worked around for this deprecated code -- find(:all)

18 views
Skip to first unread message

Mark Lindamood

unread,
Feb 23, 2014, 2:16:21 PM2/23/14
to cells-an...@googlegroups.com
Per recommendations from Rails sources, I have tried simply replacing MyModel.find(:all) with MyModel.all But that solution returned an "unidentified method 'all' error". What's the solution?

Ramon Tayag

unread,
Feb 23, 2014, 4:18:12 PM2/23/14
to cells-an...@googlegroups.com

Mark, this doesn't sound like an apotomo / cells issue. Make sure you have the right version of Rails. Also take a look at the back trace for clues.

On 24 Feb 2014 03:16, "Mark Lindamood" <jazzyja...@gmail.com> wrote:
Per recommendations from Rails sources, I have tried simply replacing MyModel.find(:all) with MyModel.all But that solution returned an "unidentified method 'all' error". What's the solution?

--
Sie erhalten diese Nachricht, weil Sie Mitglied der Google Groups-Gruppe "Cells and Apotomo" sind.
Um Ihr Abonnement für diese Gruppe zu beenden und keine E-Mails mehr von dieser Gruppe zu erhalten, senden Sie eine E-Mail an cells-and-apot...@googlegroups.com.
Weitere Optionen: https://groups.google.com/groups/opt_out

Mark Lindamood

unread,
Feb 23, 2014, 4:33:57 PM2/23/14
to cells-an...@googlegroups.com
I'm using Rails 4.0.2, but I have 4.0.1 and 4.0.0 available. Is this an issue?

Nick Sutterer

unread,
Feb 24, 2014, 3:57:29 PM2/24/14
to cells-an...@googlegroups.com
Uhm... a stacktrace would be helpful (When you get the grey Exception Message Of Death, click "Application Trace"). I totally don't know how this is related to Cells or Apotomo but we'll help you anyway! :)

Mark Lindamood

unread,
Feb 24, 2014, 4:30:49 PM2/24/14
to cells-an...@googlegroups.com
Sorry for the newbie faux pas. After this I'll confine my questions to Apotomo.

The Application Trace is this. (Yes, as an afterthought, "Input" probably isn't the best name for a model in a computer program. But since the model is an application [as in a form for gathering customer info] I ran out of synonyms which wouldn't be confusing in the context).

app/widgets/input/panel_widget.rb:8:in `display'
app/views/submissions/show.html.erb:77:in `_app_views_submissions_show_html_erb__4272292714543789542_70204639589920'


--
Sie erhalten diese Nachricht, weil Sie in Google Groups ein Thema der Gruppe "Cells and Apotomo" abonniert haben.
Um Ihr Abonnement für dieses Thema zu beenden, rufen Sie die URL https://groups.google.com/d/topic/cells-and-apotomo/ipnVCO6AsBY/unsubscribe auf.
Um Ihr Abonnement für diese Gruppe und alle ihre Themen zu beenden, senden Sie eine E-Mail an cells-and-apot...@googlegroups.com.
Weitere Optionen: https://groups.google.com/groups/opt_out



--
Democracy is the theory that the common people know what they want, and deserve to get it good and hard. H. L. Mencken.

Nick Sutterer

unread,
Feb 24, 2014, 5:03:32 PM2/24/14
to cells-an...@googlegroups.com
This is indeed related to Cells! You use a namespace Input for your cells, which is a module. Then, you have a model named Input, which causes a name clash. Rails' autoloader tries to solve it, loads the cell namespace Input and then thinks you want to work on the namespace module, which doesn't have an ::all method.

Rename the cell namespace to something else. It's not really cells-specific, this is pure Ruby.
Reply all
Reply to author
Forward
0 new messages