padrino/padrino-framework — Issue #780: Admin generator is not completely aware of the user defined model name
Author: joelcuevas
Created: 2012-02-09 20:16:13+00:00
State: open

File: padrino-admin / lib / padrino-admin / generators / admin_app.rb
Lines: 108, 109

There are hardcoded paths `admin/views/accounts/_form.#{ext}` and `admin/controllers/accounts.rb` even when the generator is called with, e.g., "-m User". This causes, obviously, a failure. It should be looking for something like `admin/controllers/users.rb` instead.

C:/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:226:in `binread': No such file or directory - c:/Padrino/admin_testing/admin/views/accounts/_form.haml (Errno::ENOENT)
from C:/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:226:in `gsub_file'
from C:/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/padrino-admin-0.10.6.c/lib/padrino-admin/generators/admin_app.rb:108:in `create_admin'
...