Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Routes not found in TestRequest#assign_parameters #1692

Closed
janv opened this Issue Jun 14, 2011 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

janv commented Jun 14, 2011

I have encountered (probably) the following problem in a 2.3.12 app:

We have a route with :method => :post

In our controller test, calling post action, … fails unless I explicity set a :format => :post parameter although that should have been inferred by the assign_parameters method.

The reason for this is, as far as I figured out:
assign_parameters calls Route#extra_keys
_extra_keys calls RouteSet#generate_extras
__which in turn calls route_generate_raw
__which doesn't return a path
_which causes RouteSet#generate to raise a RoutingError

I could not reproduce the bug in 3.1.
I will send a pull request with a failing test for 2-3-stable

janv added a commit to janv/rails that referenced this issue Jun 14, 2011

Owner

pixeltrix commented Jun 14, 2011

See my comment on your pull request: #1693

@pixeltrix pixeltrix closed this Jun 14, 2011

Contributor

janv commented Jun 14, 2011

Ooops, you're right. Sorry.

jake3030 pushed a commit to jake3030/rails that referenced this issue Jun 28, 2011

Fixing bug on ActiveRecord::Dirty#field_changed? for nullable numeric…
… columns, NULL gets stored in database for blank (i.e. '') values. Only integer columns were considered.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1692 state:committed]

jake3030 pushed a commit to jake3030/rails that referenced this issue Jun 28, 2011

Fix dirty handling of nullable non-integer numeric columns [#1692 sta…
…te:resolved]

Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment