Sutto / rocket_pants

API building tools on top of ActionController. Also, an awesome name.
MIT License
981 stars 130 forks source link

ActionController::HideActions does not exist in Rails 5 #130

Open dzjuck opened 9 years ago

dzjuck commented 9 years ago

ActionController::HideActions will be removed from Rails 5, see rails/rails#18336. Rails developers recommend to use 'private' instead 'hide_action'. So Rails 5 does not work with current version. See two ways to fix it:

  1. remove ActionController::HideActions
  2. remove ActionController::HideActions for Rails 5, and keep for another versions

What do you think? Ready to make related pr.

dzjuck commented 9 years ago

Error log

$ rails -v
Rails 5.0.0.alpha
$ rails c
/Users/admin/.rvm/gems/ruby-2.2.2/gems/rocket_pants-1.13.0/lib/rocket_pants/base.rb:18:in `<class:Base>': uninitialized constant ActionController::HideActions (NameError)
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/rocket_pants-1.13.0/lib/rocket_pants/base.rb:5:in `<module:RocketPants>'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/rocket_pants-1.13.0/lib/rocket_pants/base.rb:3:in `<top (required)>'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/rocket_pants-1.13.0/lib/rocket_pants/active_record.rb:16:in `block in <module:ActiveRecordIntegration>'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/activesupport-5.0.0.alpha/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/activesupport-5.0.0.alpha/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/activesupport-5.0.0.alpha/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/activesupport-5.0.0.alpha/lib/active_support/lazy_load_hooks.rb:44:in `each'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/activesupport-5.0.0.alpha/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/activerecord-5.0.0.alpha/lib/active_record/base.rb:318:in `<module:ActiveRecord>'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/activerecord-5.0.0.alpha/lib/active_record/base.rb:26:in `<top (required)>'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:319:in `active_record_configured?'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:251:in `disconnect_database'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:97:in `preload'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:143:in `serve'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
    from /Users/admin/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
    from /Users/admin/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/admin/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from -e:1:in `<main>'
parse commented 8 years ago

Same thing here :+1: