17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/ao_crudify/base.rb', line 17
def self.default_options(model_name)
singular_name = model_name.to_s
plural_name = singular_name.pluralize
class_name = singular_name.camelize
{
:title_attribute => singular_name,
:singular_name => singular_name,
:plural_name => plural_name,
:class_name => class_name,
:paginate => true,
:order_by => :created_at,
:direction => :numdesc,
:conditions => {},
:redirect_to_url => "admin_#{plural_name}_path",
:log => Rails.env == 'development'
}
end
|