<% form_for(@client) do |cu| %>
<% fields_for @entity do |en| %>
Name <%= en.text_field :entity_name %>
<br />Legal name <%= en.text_field :entity_legal_name %>
<br />Legal form <%= en.text_field :entity_legal_form %>
<% end %>
X-POSTED Rails Forum
Name <%= en.text_field :entity_name %>
should be something like:
Name <%= en.text_field :name %>
hth
p.s. a great way to debug this is to stick a debugger statement at the
top of your controller method, gem install ruby-debug and then start
your mongrel server like this: script/server webrick -u
or if you don't have mongrel.. What.. you don't have mongrel???!!!!
I do not think so. The attribute is indeed entity_name for in the
migration I have:
James Byrne wrote:
I do not think so. The attribute is indeed entity_name for in the
migration I have:
Whoops.. you are right, my bad! I still believe however that the data
is not coming into your controllers correctly so the missing fields trip
your validators.
I would just debug it as I suggested above and the error will come
screaming out at you..
I do not think so. The attribute is indeed entity_name for in the
migration I have:
James Byrne wrote:
I do not think so. The attribute is indeed entity_name for in the
migration I have:
Whoops.. you are right, my bad! I still believe however that the data
is not coming into your controllers correctly so the missing fields trip
your validators.
Well, perhaps I did not make myself clear to begin with. I am testing
the validators and so the data is indeed missing. The problem I am
having here is that the flash notice is not displaying on the edit page
as I expect.
This code is at a very rudimentary stage and there are a number of
intricate dependencies that I have yet to code. So I am taking care that
all the straight-forward error handling is working as I expect and that
my assumptions are checked against reality at an early stage.
p.s. a great way to debug this is to stick a debugger statement at the
top of your controller method, gem install ruby-debug and then start
your mongrel server like this: script/server webrick -u
Thanks for the heads up on this. I have installed it and found a decent
write up on it at: