Comments (7)
I ran into this too, from railstutorial chapter 13 in the microposts_interface_test. It comes from the each line:
post microposts_path, micropost: { parameters in here }
I changed that to:
post microposts_path, params: { micropost: { parameters in here } }
and this made the test work without any warnings
from tiddle.
@KenLast Thank you for reporting your findings. That's exactly the way how it should be solved! However, we need to test both under Rails 4.2 and Rails 5.0 and the new version is not available in Rails 4.2. This creates an interesting problem how to support both versions of Rails at the same time.
from tiddle.
Adam,
What are you working on? I am quite new to both Rails and Ruby, as my only
experience with either is working through Michael Hartl's railstutorial.
However, it seems that Ruby is quite open to redefinitions. Is it possible
to redefine the HTTP request parameter format conditionally based on Ruby
version?
Ken
On Mon, Sep 26, 2016 at 10:31 AM, Adam Niedzielski <[email protected]
wrote:
@KenLast https://github.com/KenLast Thank you for reporting your
findings. That's exactly the way how it should be solved! However, we need
to test both under Rails 4.2 and Rails 5.0 and the new version is not
available in Rails 4.2. This creates an interesting problem how to support
both versions of Rails at the same time.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#30 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVZzCAstPC-GByLoT5jDIth80If__X8-ks5quAGPgaJpZM4JDYYD
.
from tiddle.
I'm not working on this issue at this moment, because it's not super critical. I left it here for anyone willing to contribute to the gem.
Yes, it may be tempting to redefine the method, because it's so easy in Ruby. However, from my experience, it is usually confusing to other developers and makes the codebase more difficult to understand. What I would prefer in this case is to define a test helper (spec/support
) which checks for Rails version and invokes the method with the correct way of passing arguments.
I can help you a bit if you want to submit a PR.
from tiddle.
What gem is this from? I thought it was just from Rails.
On Mon, Sep 26, 2016 at 1:39 PM, Adam Niedzielski [email protected]
wrote:
I'm not working on this issue at this moment, because it's not super
critical. I left it here for anyone willing to contribute to the gem.Yes, it may be tempting to redefine the method, because it's so easy in
Ruby. However, from my experience, it is usually confusing to other
developers and makes the codebase more difficult to understand. What I
would prefer in this case is to define a test helper (spec/support) which
checks for Rails version and invokes the method with the correct way of
passing arguments.I can help you a bit if you want to submit a PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#30 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVZzCOFg7kftTkcedWTEAYnifQ1rIdFtks5quC2dgaJpZM4JDYYD
.
from tiddle.
Was getting close to the same error in the railstutorial: test > integration > users_login_test.rb and changed from
post login_path, session: { email: @user.email, password: 'password' }
to
post login_path, params: {session: { email: @user.email, password: 'password' }}
worked like a charm.
thanks
from tiddle.
@KenLast yes, it's from Rails, but we have to solve this problem in this gem (Tiddle) to be compatible with both Rails 4.2 and Rails 5.0
@jessedo81 Thank you for your contribution and good luck starting with Rails!
from tiddle.
Related Issues (20)
- Version 1.0 HOT 2
- Fix Rubocop offences
- Error after installed Tiddle HOT 3
- Can't change maximum token per user
- Support devise > 4.3.X HOT 2
- Time-based expiration mechanism for tokens HOT 7
- Remove unnecessary secure compare
- Devise 4.4 HOT 4
- [Question]: What for sending X-USER-EMAIL ?
- Update required fields for README HOT 2
- Tiddle can not work with devise 4.5.0. HOT 3
- Soft purge setting `revoked_at` instead of destroying auth tokens? HOT 2
- Devise can not be updated past version >=4.6
- [Question] Cookieless Tiddle & ActionCable HOT 2
- Multiple types of Users HOT 1
- Token last_used_at not being updated properly HOT 5
- Tokens pile up in the database forever HOT 1
- Switch dev setup to use Docker
- Mongoid support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiddle.