Question

I have some issue about use strong parameters on Rails 4

I have on my gemfile

  gem 'rails', '4.0.3'
  gem "strong_parameters", "~> 0.2.3"

And when I run the bundler

Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "actionpack":
  In Gemfile:

    strong_parameters (~> 0.2.3) ruby depends on
      actionpack (~> 3.0) ruby
    rails (= 4.0.3) ruby depends on
      actionpack (4.0.3)

I have tried:

  • Re-run bundler
  • Remove Gemfile.lock
  • Reinstall all gemset without the gem, and re-add it

And nothing works.

Was it helpful?

Solution

For Rails 4.0+ , strong_parameters gem is no longer required as the functionality has been built-in within the Rails framework.

See the strong_parameters official documentation page for more details.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top