hi there, I am about to embark on a mission critical financial web application, and was wondering weather ruby on rails is the best fit for this type of project. More specifically I am worried about floating point errors. Would it be more appropriate to use a more statically typed framework (.NET)? thankyou. -- Posted via http://www.ruby-forum.com/.
On 7/30/06, Simon <simon_domino@yahoo.com> wrote:> > hi there, > I am about to embark on a mission critical financial web application, > and was wondering weather ruby on rails is the best fit for this type > of project. > More specifically I am worried about floating point errors. Would it be > more appropriate to use a more statically typed framework (.NET)? > > thankyou. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >There are a few solutions for this in terms of storage, where money values are stored as either integers or seperate dollars, cents into two integer columns. I can''t speak for the float functions themselves. A plugin to get you started. http://www.agilewebdevelopment.com/plugins/dollars_and_cents -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060730/faff3d39/attachment.html
On 30 Jul 2006, at 06:25, Simon wrote:> hi there, > I am about to embark on a mission critical financial web application, > and was wondering weather ruby on rails is the best fit for this type > of project. > More specifically I am worried about floating point errors. Would > it be > more appropriate to use a more statically typed framework (.NET)?EdgeRails has some new features for decimals to avoid the floating point errors. Best regards Peter De Berdt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060730/c1b8e1a5/attachment-0001.html
On Sun, Jul 30, 2006 at 06:25:14AM +0200, Simon wrote:> I am about to embark on a mission critical financial web application, > and was wondering weather ruby on rails is the best fit for this type > of project.It''ll probably be a lot better than most, and certainly no worse, intrinsically. You will be best off deciding based on your love of the languages which you''ve got to choose from.> More specifically I am worried about floating point errors. Would it be > more appropriate to use a more statically typed framework (.NET)?How is static typing going to effect the magnitude of the errors you get from manipulating floating point numbers? At any rate, if you''re using floats to manipulate monetary amounts, you''re screwed right from the get-go, not matter *what* language you choose. Use fixed-point or shifted-integer maths instead. - Matt
Very good question - i was also pondering a financial web app. Im interesting in floating point as well as encryption possibilities. thanks for any responses. Ryan On 7/30/06, Simon <simon_domino@yahoo.com> wrote:> > hi there, > I am about to embark on a mission critical financial web application, > and was wondering weather ruby on rails is the best fit for this type > of project. > More specifically I am worried about floating point errors. Would it be > more appropriate to use a more statically typed framework (.NET)? > > thankyou. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060730/27771434/attachment.html
Simon wrote:> hi there, > I am about to embark on a mission critical financial web application, > and was wondering weather ruby on rails is the best fit for this type > of project. > More specifically I am worried about floating point errors. Would it be > more appropriate to use a more statically typed framework (.NET)?FWIW, in an upcoming Rails release you will be able to use the Ruby BigDecimal type and map it to a decimal type in the database. -- Posted via http://www.ruby-forum.com/.
On 7/29/06, abstractryan@gmail.com <abstractryan@gmail.com> wrote:> Very good question - i was also pondering a financial web app. Im > interesting in floating point as well as encryption possibilities.The ruby openssl module works very good for encryption. It''s not documented all that well and you might have to dig around for examples on some stuff, depending on what features you need. A good place to get examples is in the ruby distribution under test/openssl.
On Sun, Jul 30, 2006 at 01:20:12AM -0400, abstractryan@gmail.com wrote:> Very good question - i was also pondering a financial web app. Im > interesting in floating point as well as encryption possibilities.Floats is floats is floats is sucky for anything involving money or other fixed-point arithmetic. For encryption you''ve got OpenSSL for your basics, and a number of other libraries for the more esoteric. A nice asymmetric example from Tobias: http://blog.leetsoft.com/2006/3/14/simple-encryption - Matt
>Use fixed-point or shifted-integer maths insteadHow do you do that? -- Posted via http://www.ruby-forum.com/.
Thanks for all the responses to my post. My general feeling is that Rails is not the most suitable for my type of application at the moment although I wish it were. Happy Railing! -- Posted via http://www.ruby-forum.com/.
On Mon, Jul 31, 2006 at 10:51:00AM +0200, Chris wrote:> >Use fixed-point or shifted-integer maths instead > > How do you do that?With The Power Of Maths. A FixedPoint class should be about... 40 lines of code, I''d say. Serializing that into a database DECIMAL wouldn''t be too hard -- but didn''t someone in this thread point out some upcoming feature that will do all this already? If so, all the hard work''s done... - Matt -- Sure, it''s possible to write C in an object-oriented way. But, in practice, getting an entire team to do that is like telling them to walk along a straight line painted on the floor, with the lights off. -- Tess Snider, slug-chat@slug.org.au
Steve Bergman wrote:> Simon wrote: >> hi there, >> I am about to embark on a mission critical financial web application, >> and was wondering weather ruby on rails is the best fit for this type >> of project. >> More specifically I am worried about floating point errors. Would it be >> more appropriate to use a more statically typed framework (.NET)? > > FWIW, in an upcoming Rails release you will be able to use the Ruby > BigDecimal type and map it to a decimal type in the database. >I''m curious to see how you think a framework (Ruby or .NET) can address the relatively ancient problem of floating point errors that have been with us since pre-PC days. I was always under the impression that you have to painstakingly do this via sprintf functions.
Tom Allison wrote:> Steve Bergman wrote: >> > I''m curious to see how you think a framework (Ruby or .NET) can address > the relatively ancient problem of floating point errors that have been > with us since pre-PC days. I was always under the impression that you > have to painstakingly do this via sprintf functions.I''m looking at more the language than the framework to solve floating point errors but providing a facility to use something other than floating points (such as decimal datatypes) so that these errors don''t occur. Can sprintf solve this problem with floating point types? If so I''d like to know how. Thanks. -- Posted via http://www.ruby-forum.com/.
On Tue, Aug 01, 2006 at 04:41:28AM -0400, Tom Allison wrote:> Steve Bergman wrote: > >Simon wrote: > >>hi there, > >>I am about to embark on a mission critical financial web application, > >>and was wondering weather ruby on rails is the best fit for this type > >>of project. > >>More specifically I am worried about floating point errors. Would it be > >>more appropriate to use a more statically typed framework (.NET)? > > > >FWIW, in an upcoming Rails release you will be able to use the Ruby > >BigDecimal type and map it to a decimal type in the database. > > I''m curious to see how you think a framework (Ruby or .NET) can address > the relatively ancient problem of floating point errors that have been > with us since pre-PC days.The language or framework can help by allowing you to not use floats at all to approximate fixed-point arithmetic. - Matt
Guest wrote:> Tom Allison wrote: > >>Steve Bergman wrote: >> >>I''m curious to see how you think a framework (Ruby or .NET) can address >>the relatively ancient problem of floating point errors that have been >>with us since pre-PC days. I was always under the impression that you >>have to painstakingly do this via sprintf functions. > > > I''m looking at more the language than the framework to solve floating > point errors but providing a facility to use something other than > floating points (such as decimal datatypes) so that these errors don''t > occur. > Can sprintf solve this problem with floating point types? If so I''d like > to know how. > Thanks. >Well the floating point errors that I am familiar with always fall into a pattern of rounding errors. For example 2.00 becomes 1.99999999999... or similar. sprintf("%.2f", var) will always return 2.00 or even convert 1/3 to .33 or 2/3 to .67. You could expirement with the use of the database to address this as well. If you create a field numeric(9,2) then it will only store two decimal points of the number. I do not know if this will store a truncated or rounded value but it might be worth knowing. Getting back to the floating point errors, I have routinely run applications in the past through a cleanup function that simply applies a rounding to the variable. Archaic as it may sound to some, this was the recommended practice back in the heady days of Fortran and Pascal. I supposed you could add your own method to Float to provide a "cleanly rounded" value like: balance = calculation().clean
On 8/1/06, Tom Allison <tallison@tacocat.net> wrote:> Steve Bergman wrote: > > Simon wrote: > >> hi there, > >> I am about to embark on a mission critical financial web application, > >> and was wondering weather ruby on rails is the best fit for this type > >> of project. > >> More specifically I am worried about floating point errors. Would it be > >> more appropriate to use a more statically typed framework (.NET)? > > > > FWIW, in an upcoming Rails release you will be able to use the Ruby > > BigDecimal type and map it to a decimal type in the database. > > > > I''m curious to see how you think a framework (Ruby or .NET) can address > the relatively ancient problem of floating point errors that have been > with us since pre-PC days. I was always under the impression that you > have to painstakingly do this via sprintf functions.See http://www.ruby-doc.org/stdlib/libdoc/bigdecimal/rdoc/classes/BigDecimal.html
On 7/31/06, Guest <simon_domino@yahoo.com> wrote:> Thanks for all the responses to my post. > My general feeling is that Rails is not the most suitable for my type > of application at the moment although I wish it were.Why do you think that? Joe
On 8/2/06, Joe Van Dyk <joevandyk@gmail.com> wrote:> On 7/31/06, Guest <simon_domino@yahoo.com> wrote: > > Thanks for all the responses to my post. > > My general feeling is that Rails is not the most suitable for my type > > of application at the moment although I wish it were. > > Why do you think that?I mean, to avoid floating point errors, use the BigDecimal class. See http://www.ruby-doc.org/stdlib/libdoc/bigdecimal/rdoc/classes/BigDecimal.html I don''t see how static typed languages (like in .NET) help at all for avoiding floating point errors. Joe
On Jul 31, 2006, at 10:25 am, Guest wrote:> Thanks for all the responses to my post. > My general feeling is that Rails is not the most suitable for my type > of application at the moment although I wish it were. > Happy Railing!Simon, If it''s any use to you, the company I work for ( www.codeweavers.net ) produces almost exclusively financial applications, and we are now starting to switch to Rails. The lack of proper fixed decimal support was a killer so I wrote a patch, that is now incorporated with someone else''s code in Edge Rails. In the mean time, you might be interested in the plugin version of the original code, at www.ashleymoran.me.uk . You can use this in the mean time with gem Rails 1.1. Incidentally we have a vacancy for a Rails developer if anyone is interested :) Ashley
Ashley Moran wrote:> On Jul 31, 2006, at 10:25 am, Guest wrote: > >> Thanks for all the responses to my post. >> My general feeling is that Rails is not the most suitable for my type >> of application at the moment although I wish it were. >> Happy Railing! > > Simon, > > If it''s any use to you, the company I work for > ( www.codeweavers.net ) produces almost exclusively financial > applications, and we are now starting to switch to Rails.> AshleyAshley, may I ask what you are using before rails? You obviously think that rails is worth the switch despite having to write a patch to support decimal types, I don''t think that I would go to that much trouble ( I''m a bit lazy and not that good a coder - or possibly have self esteem issues :). I thought that rails might not be good for number crunching apps because I saw some stats on the web that suggest it was quite slow in comparison (when it comes to doing math) and also because of the decimal types thing. I don''t claim to be an expert so I could be wrong. -- Posted via http://www.ruby-forum.com/.
On 8/3/06, Guest <simon_domino@yahoo.com> wrote:> Ashley Moran wrote: > > On Jul 31, 2006, at 10:25 am, Guest wrote: > > > >> Thanks for all the responses to my post. > >> My general feeling is that Rails is not the most suitable for my type > >> of application at the moment although I wish it were. > >> Happy Railing! > > > > Simon, > > > > If it''s any use to you, the company I work for > > ( www.codeweavers.net ) produces almost exclusively financial > > applications, and we are now starting to switch to Rails. > > > Ashley > > Ashley, > may I ask what you are using before rails? You obviously think that > rails is worth the switch despite having to write a patch to support > decimal types, I don''t think that I would go to that much trouble ( I''m > a bit lazy and not that good a coder - or possibly have self esteem > issues :). > > I thought that rails might not be good for number crunching apps because > I saw some stats on the web that suggest it was quite slow in comparison > (when it comes to doing math) and also because of the decimal types > thing. I don''t claim to be an expert so I could be wrong.You don''t have to write a patch to support decimal types. The latest versions (the trunk) of Rails already include it.
On Aug 03, 2006, at 3:50 pm, Guest wrote:> Ashley, > may I ask what you are using before rails?Simon We''ve used mainly C#/.Net, and used Flash for the front end of one app.> You obviously think that > rails is worth the switch despite having to write a patch to support > decimal types,It was pretty much the only thing I didn''t like about Rails. You have to be flexible when looking at Rails... it''s easy to come up with a list of imaginary reasons not to use it, like... Ruby''s too slow and not statically typed, Rails gets you started fast but isn''t maintainable code, it''s not "enterprise level", etc ad nauseam. When you actually *use* it you realise how many benefits it offers, but if in your mind that extra bit of work is worse than 10,000 XML situps, you''re bound not to want to use it. Admittedly, decimal support was a fairly big piece of work, but I imagine everyone on the list with working Rails app has come across something Rails doesn''t do (as if Java would do it for you!) but I doubt any would want to switch to a different platform.> I don''t think that I would go to that much trouble ( I''m > a bit lazy and not that good a coder - or possibly have self esteem > issues :).Lol... it was quite a bit of work and I didn''t have a clue what I was doing at first, but it was worth it. Also poking around in the Rails core gives you a better idea how it works. And it''s beautifully constructed too. I wish we wrote code as well :)> I thought that rails might not be good for number crunching apps > because > I saw some stats on the web that suggest it was quite slow in > comparison > (when it comes to doing math) and also because of the decimal types > thing. I don''t claim to be an expert so I could be wrong.It depends... there''s just been a marathon thread on the ruby-talk list called "For performance, write it in C". The question you have to ask is not how fast Rails or Ruby is, but is it fast *enough*? If you want to simulate nuclear fusion or protein folding, then no, you probably won''t want to use Ruby. But the ratio of developer to hardware costs is now ridiculously high, so I doubt that language runtime performance is the limiting factor for 99% of apps around today. Ashley
Guest wrote:> I thought that rails might not be good for number crunching apps because > I saw some stats on the web that suggest it was quite slow in comparison > (when it comes to doing math)I don''t think that applications like loan calculations have anything to do with "number cruching". -- Posted via http://www.ruby-forum.com/.
Hi all. This is my first post here, so here goes.. http://pastie.caboo.se/7267 That is my MVC for the problem in question. I''m trying to create a login module and I''m on account registration. The problem is when I do @user = User.new(params[:users]) which should populate the record, it instead yields #<User:0x227c100 @password="testt", @email="test@test.net", @new_record=true, @attributes={"installation_id"=>0, "password_hash"=>"", "email"=>""}> Instead of what it should (in my opinion) be, which is : #<User:0x227c100 , @new_record=true, @attributes= {"installation_id"=>50, "password_hash"=>"40char_hash_here", "email"=>"test@test.net"}> When I do User.save I recieve the following SQL statement (taken from dev.log) SQL (0.000303) INSERT INTO users (`installation_id`, `password_hash`, `email`) VALUES(0, ''3da541559918a808c2402bba5012f6c60b27661c'', '''') Any ideas on how I might fix this? Thanks! -justin Additional Info: =============Intel Mac Ruby 1.8.2 Rails 1.1.4 MySQL 4.1.21
Hi Justin, it shouldn''t matter, but there is going on so much magic in rails because of the naming conventions that you might try and use <%= password_field "user", "password" %> instead of <%= password_field "users", "password" %> this is user instead of user___s___ The hash function might be simply the hash of an empty string... Cheers, Jan On 8/4/06, Justin Lilly <justinlilly@gmail.com> wrote:> > Hi all. > This is my first post here, so here goes.. > > http://pastie.caboo.se/7267 > > That is my MVC for the problem in question. I''m trying to create a > login module and I''m on account registration. The problem is when I > do @user = User.new(params[:users]) which should populate the > record, it instead yields > > #<User:0x227c100 @password="testt", @email="test@test.net", > @new_record=true, @attributes={"installation_id"=>0, > "password_hash"=>"", "email"=>""}> > > Instead of what it should (in my opinion) be, which is : > > #<User:0x227c100 , @new_record=true, @attributes> {"installation_id"=>50, "password_hash"=>"40char_hash_here", > "email"=>"test@test.net"}> > > > When I do User.save I recieve the following SQL statement (taken from > dev.log) > > SQL (0.000303) INSERT INTO users (`installation_id`, > `password_hash`, `email`) VALUES(0, > ''3da541559918a808c2402bba5012f6c60b27661c'', '''') > > Any ideas on how I might fix this? Thanks! > > -justin > > Additional Info: > =============> Intel Mac > Ruby 1.8.2 > Rails 1.1.4 > MySQL 4.1.21 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060804/f1d2b7f0/attachment-0001.html
Hey Justin - you should also check the post(get) from the form - it''ll show you what was passed - you can post that section of your development.log here Plus it looks like you don''t have an ''id'' (lowercase) column for your users table - be sure to create on (type integer). cheers, Jodi On 4-Aug-06, at 4:26 PM, Jan Prill wrote:> Hi Justin, > > it shouldn''t matter, but there is going on so much magic in rails > because of the naming conventions that you might try and use > > <%= password_field "user", "password" %> instead of > > <%= password_field "users", "password" %> > > this is user instead of user___s___ > > The hash function might be simply the hash of an empty string... > > Cheers, > Jan > > On 8/4/06, Justin Lilly <justinlilly@gmail.com> wrote: > Hi all. > This is my first post here, so here goes.. > > http://pastie.caboo.se/7267 > > That is my MVC for the problem in question. I''m trying to create a > login module and I''m on account registration. The problem is when I > do @user = User.new(params[:users]) which should populate the > record, it instead yields > > #<User:0x227c100 @password="testt", @email="test@test.net", > @new_record=true, @attributes={"installation_id"=>0, > "password_hash"=>"", "email"=>""}> > > Instead of what it should (in my opinion) be, which is : > > #<User:0x227c100 , @new_record=true, @attributes> {"installation_id"=>50, "password_hash"=>"40char_hash_here", > "email"=>"test@test.net "}> > > > When I do User.save I recieve the following SQL statement (taken from > dev.log) > > SQL (0.000303) INSERT INTO users (`installation_id`, > `password_hash`, `email`) VALUES(0, > ''3da541559918a808c2402bba5012f6c60b27661c'', '''') > > Any ideas on how I might fix this? Thanks! > > -justin > > Additional Info: > =============> Intel Mac > Ruby 1.8.2 > Rails 1.1.4 > MySQL 4.1.21 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060804/c5cf0c6f/attachment-0001.html
Jan: I just tried changing it to useR instead of userS and the result was an error (NoMethodError) on my view. Specifically at the line containing: <%= password_field "user", "password_confirmation" %> undefined method `password_confirmation'' for #<User:0x23ee90c> I do not get this error when they are ''users'' instead of ''user''. This may have something to do with the fact that my Model is "user" but my controller is "users" (silly thing to do, I think). (I was also sure to change the call to params[:userS] to params[:useR] too. Jodi: The parameters passed are as follows: Parameters: {"commit"=>"Register", "action"=>"register", "controller"=>"users", "users"=>{"installation_id"=>"59", "password_confirmation"=>"test", "password"=>"test", "email"=>"test@test.com"}} which resulted in the following SQL query (some logging): attempting to save user SQL (0.000185) BEGIN User Load (0.000738) SELECT * FROM users WHERE (users.email = ''test@test.com'') LIMIT 1 SQL (0.000380) INSERT INTO users (`installation_id`, `password_hash`, `email`) VALUES(0, ''a94a8fe5ccb19ba61c4c0873d391e987982fbbd3'', ''test@test.com'') SQL (0.073029) COMMIT save successful I did have an id field, but it is left out (it comes default) in Schema.rb (and similarly with migrate files) Hope this makes some sense. Its rather demeaning to not be able to figure out a login module. *chuckles* Thanks for the help, -justin On Aug 4, 2006, at 4:26 PM, Jan Prill wrote:> Hi Justin, > > it shouldn''t matter, but there is going on so much magic in rails > because of the naming conventions that you might try and use > > <%= password_field "user", "password" %> instead of > > <%= password_field "users", "password" %> > > this is user instead of user___s___ > > The hash function might be simply the hash of an empty string... > > Cheers, > Jan > > On 8/4/06, Justin Lilly <justinlilly@gmail.com> wrote: > Hi all. > This is my first post here, so here goes.. > > http://pastie.caboo.se/7267 > > That is my MVC for the problem in question. I''m trying to create a > login module and I''m on account registration. The problem is when I > do @user = User.new(params[:users]) which should populate the > record, it instead yields > > #<User:0x227c100 @password="testt", @email="test@test.net", > @new_record=true, @attributes={"installation_id"=>0, > "password_hash"=>"", "email"=>""}> > > Instead of what it should (in my opinion) be, which is : > > #<User:0x227c100 , @new_record=true, @attributes> {"installation_id"=>50, "password_hash"=>"40char_hash_here", > "email"=>"test@test.net "}> > > > When I do User.save I recieve the following SQL statement (taken from > dev.log) > > SQL (0.000303) INSERT INTO users (`installation_id`, > `password_hash`, `email`) VALUES(0, > ''3da541559918a808c2402bba5012f6c60b27661c'', '''') > > Any ideas on how I might fix this? Thanks! > > -justin > > Additional Info: > =============> Intel Mac > Ruby 1.8.2 > Rails 1.1.4 > MySQL 4.1.21 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060804/91744d35/attachment-0001.html
Hi Justin, yes for the password_confirmation part you don''t need to set it to the user params. Just put it in another key-value pair of the params hash, since you need it only for confirmation issues and won''t save it to the db. For me it was always a convention to put things into a hash that has the same name as the Class and this would be the singularized ''user'' You''ve made some progress though since now the email gets submitted. One questions persists: Why isn''t the installation_id put into the insert sql... Cheers, Jan> >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060804/7e330722/attachment.html
Hi Jan, Actually I''m not submitting the email. Again the sql statement is: SQL (0.000303) INSERT INTO users (`installation_id`, `password_hash`, `email`) VALUES(0, ''3da541559918a808c2402bba5012f6c60b27661c'', '''') Which is only submitting the hash. Again for readability: SQL (0.000303) INSERT INTO users (`installation_id`, `password_hash`, `email`) VALUES(0, ''thehash'', '''') I''m still at a loss of why this might be doing this as everything APPEARS to be fine (at least to the ruby newbie). Any thoughts you may have or leads towards getting it fixed would be great. -justin On Aug 4, 2006, at 5:46 PM, Jan Prill wrote:> Hi Justin, > > yes for the password_confirmation part you don''t need to set it to > the user params. Just put it in another key-value pair of the > params hash, since you need it only for confirmation issues and > won''t save it to the db. For me it was always a convention to put > things into a hash that has the same name as the Class and this > would be the singularized ''user'' > > You''ve made some progress though since now the email gets > submitted. One questions persists: Why isn''t the installation_id > put into the insert sql... > > Cheers, > Jan > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Hi Justin, if you don''t mind post all of the stuff that matters user-model, users-controller and the view and I''ll try it out here by myself. Maybe I''m able to find something. Cheers, Jan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060807/03ca36e2/attachment-0001.html
From original email: http://pastie.caboo.se/7267 that link shows my schema, controller, model, and view. If you need anything else, just let me know. -justin On Aug 7, 2006, at 4:50 PM, Jan Prill wrote:> Hi Justin, > > if you don''t mind post all of the stuff that matters user-model, > users-controller and the view and I''ll try it out here by myself. > Maybe I''m able to find something. > > Cheers, > Jan > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
I figured it out, though I don''t really know how. Thanks for your help anyhow. -justin
Hey Justin, is it possible that: attr_accessible :email, :password is overriding the (email) column attribute? You''ve probably added this for a reason, but I''m not sure what this does for you. http://api.rubyonrails.com/classes/ActiveRecord/Base.html#M000874 Jodi On 8-Aug-06, at 5:52 PM, Justin Lilly wrote:> From original email: > > http://pastie.caboo.se/7267 > > > that link shows my schema, controller, model, and view. If you need > anything else, just let me know. > > -justin > > > On Aug 7, 2006, at 4:50 PM, Jan Prill wrote: > >> Hi Justin, >> >> if you don''t mind post all of the stuff that matters user-model, >> users-controller and the view and I''ll try it out here by myself. >> Maybe I''m able to find something. >> >> Cheers, >> Jan >> >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Hi Justin, sorry for answering that late. I''ve pasted your code into a trial project and everything seems to be working. I''ve deleted the installation select box, since I haven''t got the installation model. What happens if you are doing the same? Here''s what the development.log has put out: Processing UsersController#register (for 127.0.0.1 at 2006-08-10 10:43:21) [POST] Session ID: a49b4781178562dc2c97bf0fc6a32fb6 Parameters: {"commit"=>"Register", "action"=>"register", "controller"=>"users", "users"=>{"password_confirmation"=>"asdf", "password"=>"asdf", "email"=>"seems_to_be@working.de"}} User Columns (0.000000) SHOW FIELDS FROM users SQL (0.000000) BEGIN User Load (0.000000) SELECT * FROM users WHERE (users.email = '' seems_to_be@working.de'') LIMIT 1 SQL (0.000000) INSERT INTO users (`installation_id`, `password_hash`, `email`) VALUES(0, ''3da541559918a808c2402bba5012f6c60b27661c'', '' seems_to_be@working.de'') SQL (0.047000) COMMIT Redirected to http://localhost:3003/users Completed in 0.07800 (12 reqs/sec) | DB: 0.04700 (60%) | 302 Found [ http://localhost/users/register] Cheers, Jan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060810/3df904e3/attachment.html
montyman wrote:> > More specifically I am worried about floating point errors. Would it be > more appropriate to use a more statically typed framework (.NET)? >For an example of how to do fixed-point ''money math'' in Rails check out this post: http://clickablebliss.com/blog/2006/06/14/using_aggregation_in_rails_to_manage_money/ -- View this message in context: http://www.nabble.com/ruby-suitable-for-financial-apps--tf2022370.html#a5796971 Sent from the RubyOnRails Users forum at Nabble.com.