-
Notifications
You must be signed in to change notification settings - Fork 753
Closed
Labels
Description
Steps to reproduce
class MyController < ApplicationController
def foo
props = params.permit(:foo_bar, :baz_etc)
render component: 'foo', props: props, camelize_props: true
end
end
Note that the given props are not properly camelized when rendered to the React component. This is because React.camelize_props
does not recognize ActionController::Parameters
as a valid hash and returns it as-is.
Expected behavior
React.camelize_props
should camelize instances of ActionController::Parameters
.
Actual behavior
React.camelize_props
does not camelize instances of ActionController::Parameters
.
I was going to submit a PR, but I noticed that the gem spec only requires Rails 3.2, so I wasn't sure what the best approach might be for testing with a class that didn't appear until Rails 4.