Comments (4)
That s because in dev mode you are receiving a parameter hash which includes only strings.
In your test case you are not passing a string, but instead a number, which activescaffold does nt like. Your fix might lead to trouble in case of localized number formats. In that case activescaffold expects the number to be in a special format.
from active_scaffold.
I don't quite understand. You're saying in dev mode the param hash is in strings, but in testing it is not, right? I do get the same error even if I put the number in quotes in the fixture. Is the hash in production mode in strings, also? If so, how would forcing value to be a string cause a problem? What is the right way to construct the test fixture?
from active_scaffold.
Unfortunetly, there is nt currently the "right" way. If you a re in dev or prod mode, user is entering values into a form. These values are passed to the server and activescaffold tries to read these string values and assign them to an activerecord object.
In test mode you are not entering values into a form, instead you are using a fixture in your case, which is basically an activerecord object at the end.
ActiveScaffold is nt prepared to receive attribute values directly from an activerecord object.
I do not think it will be a big change, though....
from active_scaffold.
..
from active_scaffold.
Related Issues (20)
- as_offerings-search-input does not get re-enabled after search HOT 1
- Rails 3.1 support HOT 4
- undefined method `formats' for nil:NilClass when using render :active_scaffold => ... HOT 7
- sessions created in all controllers (including non-activescaffold) HOT 1
- Typo in date format conversion HOT 1
- CRUD Actions will not show up (javascript update issue?) HOT 4
- prototype patch to support replacing TR/TD/TBODY causes error HOT 1
- Deleting subform plural association last record HOT 8
- list_pagination_links leads to stack too deep error in production HOT 2
- column overrides can not provide HTML HOT 4
- List refresh issues and gem problems HOT 11
- How to access field values for Field Overides HOT 1
- Search -> JS Error: Syntax error, unrecognized expression: [object Object]:first *:input[type!=hidden]:first HOT 4
- NoMethodError - undefined method 'page' HOT 4
- CSS issue with Google Chrome
- Nest pagination does not work correctly with 3.0.30 HOT 8
- html.stripScripts is not a function HOT 3
- Error using AS & CarrierWave - undefined method `strip'
- Installation for Rails 4.0 HOT 1
- Association has many sorting vs default ActiveScaffoldController Sorting 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 active_scaffold.