Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing before method when working with Rails 4.1.0-b1 #27

Open
cassiuschen opened this issue Jan 16, 2014 · 8 comments
Open

Missing before method when working with Rails 4.1.0-b1 #27

cassiuschen opened this issue Jan 16, 2014 · 8 comments

Comments

@cassiuschen
Copy link

When I put before_filter RubyCAS::Filter in my controller's script, it drops that undefined methodbefore' for RubyCAS::Filter:Class`...

I don't know why but rubycas-client-rails works just fine with Rails 4.0.2 in another app. Could you please help me to figure it out?

@railsfactory-anandvignesh

Absolutely,myself also suffering with the same problem..

@cassiuschen
Copy link
Author

Is that about the changes in Rails 4.1.0? Considering before_filter has been officially token place by before_action, I didn't find any difference between these two method before using rubycas.....

@rodkey
Copy link

rodkey commented Jun 19, 2014

So to be clear: if instead of putting in
before_filter RubyCAS::Filter
I use
before_action RubyCAS::Filter

all should be well?

@jimee02
Copy link

jimee02 commented Jun 20, 2014

For anyone stuck with this problem, the before method seems to be missing from the filter class.

You can use an older version of the rubycas-client or clone the master branch.
gem 'rubycas-client', :git => 'git://github.com/rubycas/rubycas-client.git'

The gem has not been updated with the bug fix

@utilum
Copy link

utilum commented Aug 11, 2014

I was stuck with this problem and ended up using the solution proposed by jimee02.

But it took a little while to understand the solution: Remove rubycass-client-rails from your Gemfile and use the older, rubycas-client instead, specifiying you want the master branch as in the line above. Then follow the coniguration instructions in this older gem's doc.

@cassiuschen
Copy link
Author

It's not about which one is older. If your Rails version is above 4.1, it needs the before method when you call before_filter or before_action. So I added it and merged into master branch. That's why you need to select the master branch from GitHub or clone it to local.

在 2014年8月11日,下午11:19,utilum [email protected] 写道:

I was stuck with this problem and ended up using the solution proposed by jimee02.

But it took a little while to understand the solution: Remove rubycass-client-rails from your Gemfile and use the older, rubycas-client instead, specifiying you want the master branch as in the line above. Then follow the coniguration instructions in this older gem's doc.


Reply to this email directly or view it on GitHub.

rheaplex pushed a commit to creativecommons/rubycas-client-rails that referenced this issue Jul 23, 2015
@duhaime
Copy link

duhaime commented Apr 27, 2016

Awesome, thanks!

@sg552
Copy link

sg552 commented Apr 18, 2018

cool. it works for me . thanks @jimee02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants