#819 ✓resolved
Arnaud D.

input-many : class_name method not found

Reported by Arnaud D. | October 2nd, 2010 @ 09:41 PM | in Hobo 1.3 (Rails 3)

Hi,

it seems that in rails 3, class_name is not defined anymore, but is used in input-many tag.
As a solution, we can add this file:

config/initializers/class_name.rb

module ActiveRecord class Base class << self # Turns a +table_name+ into a class name. Singularise the table name, if # table names are pluralised; then camelise. This follows the basic # technique used by the +initialize+ method at # activerecord-3.0.0.rc/lib/active_record/fixtures.rb:543. def class_name(table_name = self.table_name) (ActiveRecord::Base.pluralize_table_names ? table_name.singularize : table_name).camelize end end end end

Maybe it can be added while creating a new hobo application.
I'm not sure it can be considered as a rails 3 bug :/

Regards,
Arnaud.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages