Closed firedev closed 8 years ago
Dear firedev,
indeed this is an issue. Katapult
relies on the new
action being always present, which is wrong. As a hotfix, add wui.action :create
to your Web User Interface and run again. After a successful transform, remove the new
and create
actions, routes and views.
Sorry for the inconveniences. I'll release a fix.
Also this
/Users/pain/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/katapult-0.1.0/lib/katapult/wui.rb:54:in `path': Unknown action 'edit' (Katapult::WUI::UnknownActionError)
/Users/pain/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/katapult-0.1.0/lib/katapult/wui.rb:54:in `path': Unknown action 'destroy' (Katapult::WUI::UnknownActionError)
And maybe this:
run bin/rake db:create db:migrate RAILS_ENV=test from "."
/Users/pain/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:538:in `add_route': Invalid route name, already in use: 'root'
def customer_scope
customer.scoped # should be Customer
end
View:
%dl.values
%dt
= customer.human_attribute_name(:name) # Customer
%dd
= @customer.name
%dt
= customer.human_attribute_name(:birth) # Customer
%dd
Ok, that's many issues. I'm sorry. However, thank you for trying katapult
and reporting those bugs. I will look into that.
You may want to look into https://github.com/makandra/katapult/blob/5854bbb4b2b99f5bd7c6da2279179a72f2947b2f/features/wui.feature and try that application model there. The feature was green when I last ran it, so you should get it going. As for the customer
vs. Customer
– I have no idea how that went wrong.
No problem, I got it all running, just reporting so you could fix it when you have time.
My commit only fixes the capitalization issue (Customer.
vs customer.
).
0.1.2 fixes the multiple routes issue.
Ok, 0.2.0 fixes all of these issues except for one: Katapult still requires all crud actions in a WUI, which will be fixed some day. Closing this issue.
Tried to generate the test fixtures from
application_model.rb
. Just for the recorddate
doesn't seem to work now, but that is not the case.Changed it to
datetime
:But anyway it could not generate the views. Please advise. Thanks.
Here is the output: