[Rails] Re: Question on the latest rails book

2009-08-08 Thread Marnen Laibow-Koser
Phlip wrote: [...] So routes.rb is one of the files you must bounce the server if you edit. Unless you're using Rails 2.3, which (in dev mode) immediately incorporates changes in the routes file. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via

[Rails] Re: has_many :through, multi model form unable to save new child

2009-08-08 Thread James West
James West wrote: James West wrote: Sorry, I ommited to post the actual error which is now Cannot modify association 'User#addresses' because the source reflection class 'Address' is associated to 'UserRole' via :has_many. Further investigation shows that the address record seems to have

[Rails] Re: Scaffolding in a sub-directory on Rails 2.x

2009-08-08 Thread James West
Sijo Kg wrote: Hi Not only doing the above solves all..You have to edit a lot of places. Rather than I explain all these and grab a lot more spaces here you better read this Read section Namespaced Routes in

[Rails] Re: Best Practices Question

2009-08-08 Thread James West
pharrington wrote: On Aug 7, 11:54�pm, Phlip phlip2...@gmail.com wrote: Views should be dumb, Controllers thin, and Models fat. If the deliver_ call were one line, it qualifies for the Controller. But... The delivered template is itself a View. Hence it should be dumb. Hence anything

[Rails] Doubt retrieving data?

2009-08-08 Thread karthik k
hi my controller has def searchwithstatus @agency=params[:agency][:agency_id] @contract=params[:agency][:contracts_id] @agencies=Agency.find(:all,:conditions={:deleted=1,:contract_id=@contract,:state_id=@state}) end when i am executing the code in line 3 it is saying as *Mysql::Error:

[Rails] Re: A weird database association

2009-08-08 Thread Colin Law
2009/8/7 Jason Burgett rails-mailing-l...@andreas-s.net: I'm trying to figure out a way to create this relationship: a user has many friends which are themselves users I have an existing 'users' table in the database. I've created a 'friends' database with: id: integer user_id: integer

[Rails] Re: Question on the latest rails book

2009-08-08 Thread Colin Law
2009/8/8 Phlip phlip2...@gmail.com: Paulo J. Matos wrote: I am learning rails by going through 3rd ed of the Rails book. In page 153, after creating the user scaffold it says: Since this modified config/routes.rb, which is cached for performance reasons, you will need to start the server.

[Rails] Re: Doubt retrieving data?

2009-08-08 Thread James West
Karthik Kantharaj wrote: # *how can i access the contract_id which is in another table* :contract_id=#...@contract.id} -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby

[Rails] Open source rails 2 books

2009-08-08 Thread Fla As
Hello, where can I find open source rails 2 books? Thank you in advance. Cheers, -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

[Rails] Re: Open source rails 2 books

2009-08-08 Thread James West
Fla As wrote: Hello, where can I find open source rails 2 books? Thank you in advance. Cheers, Go and buy the pdf AWDWR http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition Your software has cost you nothing, putting your hand in your pocket to find £15

[Rails] Re: Question on the latest rails book

2009-08-08 Thread James West
For what it's worth I am witrh Colin on this but this is covered in the foot note on page 46 of the pdf 6. If instead you see a message to the effect of No route matches /say/hello, try stopping and restarting your server, because something you have done caused Rails to cache your

[Rails] Re: Doubt retrieving data?

2009-08-08 Thread karthik k
On Sat, Aug 8, 2009 at 1:47 PM, James West rails-mailing-l...@andreas-s.net wrote: Karthik Kantharaj wrote: # *how can i access the contract_id which is in another table* :contract_id=#...@contract.id} hi James West Thank you

[Rails] Re: ActionController::UnknownAction (No action responded to 22.

2009-08-08 Thread Alexei Lexx
Ilan Berci wrote: Alexei Lexx wrote: I use memcahed sessions. clear your memcached sessions prior to deployment to production.. development and production are using the same memcache? No of course, development and productions are different servers. I restarted memcached to clear

[Rails] how to get id of other table

2009-08-08 Thread Kart
Hi All, I have a doubt regarding join tables I'm having 2 models 1)Fac 2)Cont and both models have has and belong to many relationships so there are 3 tables 1)facs 2)conts 3)conts_facs then i'm fetching the data in controller as @conts=Cont.find(:all]) @cfacs=Fac.all(:joins=:conts,

[Rails] Re: Best Practices Question

2009-08-08 Thread David A. Black
Hi -- On Fri, 7 Aug 2009, pharrington wrote: On Aug 7, 11:54 pm, Phlip phlip2...@gmail.com wrote: Ilan Berci wrote: While not knowing your problem domain at all, I have a preference for thin dumb controllers (that fit easily within REST), I would move the mailer down into models/ or lib/

[Rails] Re: Best Practices Question

2009-08-08 Thread David A. Black
Hi -- On Fri, 7 Aug 2009, Phlip wrote: Ilan Berci wrote: While not knowing your problem domain at all, I have a preference for thin dumb controllers (that fit easily within REST), I would move the mailer down into models/ or lib/ hth ilan +1 (FWIW!) Views should be dumb,

[Rails] Re: gem install mysql fails

2009-08-08 Thread Christopher Small
There was just a discussion about this over on the railsforum website and someone seems to have figured it out. Check it - http://railsforum.com/viewtopic.php?pid=106007#p106007, or more directly - http://nmanzi.com/?p=39. -- Posted via http://www.ruby-forum.com/.

[Rails] formating date and time

2009-08-08 Thread Aashish Kiran
I want to display date and time in view as August 7, 2009 at 10:22:02 am. Presently it is displaying in view as 2009-08-07 10:22:02 UTC. Can anyone tell to format date and time. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Wamp doesn't work after installing with InstantRails

2009-08-08 Thread JC
Hello. I installed ROR with InstantRails and it works fine. But later, when I tried to access to localhost via wamp, wamp didn't work. (I have previous projects sitting in 'C:\wamp\www' folder, and I used to access them via wamp's 'http://localhost/') Wamp server starts up on the tray bar as

[Rails] Re: Yaml for jqgrid

2009-08-08 Thread Miguel Rodriguez
http://www.2dconcept.com/jquery-grid-rails-plugin maybe help you. On Aug 7, 12:49 pm, Rob Cash rails-mailing-l...@andreas-s.net wrote: Anyone have a more extensive yaml file for jqgrid than the one that's shown with the example Jqgrid Demos page? Also, I've been successful in just using the

[Rails] Re: formating date and time

2009-08-08 Thread Colin Law
2009/8/8 Aashish Kiran rails-mailing-l...@andreas-s.net: I want to display date and time in view as  August 7, 2009 at 10:22:02 am. Presently it is displaying in view as 2009-08-07 10:22:02 UTC. Can anyone tell to format date and time. Have a look at strftime. (Did you try googling for ruby

[Rails] Re: Wamp doesn't work after installing with InstantRails

2009-08-08 Thread Colin Law
2009/8/8 JC jtothe...@gmail.com: Hello. I installed ROR with InstantRails and it works fine. But later, when I tried to access to localhost via wamp, wamp didn't work. (I have previous projects sitting in 'C:\wamp\www' folder, and I used to access them via wamp's 'http://localhost/') Wamp

[Rails] Re-initialising page after validation fails

2009-08-08 Thread Andrew Myers
Hi, I have a controller and two of the actions in it are as follows: # GET /bids/new # GET /bids/new.xml def new @bid = Bid.new @auctionItems = AuctionItem.find(:all) respond_to do |format| format.html # new.html.erb format.xml { render :xml = @bid } end

[Rails] Start contributing to open source

2009-08-08 Thread Milan Dobrota
I want to start contributing to open source. I aim at ruby, with or without rails. 1) What is the best way to find the right project? Github? 2) Is it better to work on something that has just started with development, or perhaps to submit patches for bigger projects? 3) What is the process

[Rails] Re: Start contributing to open source

2009-08-08 Thread Mike Gunderloy
It's going to be tough to answer your whole list of questions, because open source projects vary so widely, as do their contributors. As a rule of thumb, I've found most projects are more than willing to accept help if you show them you can actually improve things. One option for getting

[Rails] validates_format_of

2009-08-08 Thread Andrew Myers
Hi, I have this in one of my models: validates_format_of :amount, :with = /\A[0-9]{1,5}\.[0-9]{2}\Z/ If I enter an amount that ends with .00, eg. 123.00 or 300.00 it fails, and I cannot understand why. It works with 123.11 or 300.01, etc. I have also tried: validates_format_of :amount,

[Rails] xml-containing models

2009-08-08 Thread jhaagmans
Because the definitions of certain objects in our models are growing out of control, we're looking into the possibility of simply defining some of our objects in XML, rather than using many models and having to use complicated join queries that make our application quite heavy. Basically, we're

[Rails] Re: validates_format_of

2009-08-08 Thread jhaagmans
Try telling ruby that a variable contains the value 300.00, it will say: a = 300.00 = 300.0 a = 300.0 And there's your answer. You will have to tell Ruby that this is a so- called double. to_d didn't work in my local environment, but that Ruby version is quite old. Try to to find how to

[Rails] Re: formating date and time

2009-08-08 Thread nirosh
THIS IS THE SOLUTION TRY THIS %=DateTime.now.strftime(%B %d %Y)% %= DateTime.now.strftime(%I: %M%P ) % On Aug 8, 3:19 pm, Colin Law clan...@googlemail.com wrote: 2009/8/8 Aashish Kiran rails-mailing-l...@andreas-s.net: I want to display date and time in view as  August 7, 2009 at

[Rails] Re: Open source rails 2 books

2009-08-08 Thread Marnen Laibow-Koser
James West wrote: [...] Go and buy the pdf AWDWR http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition I suspect the OP knows about AWDWR -- he was looking for open-source books. Your software has cost you nothing, putting your hand in your pocket to find

[Rails] Re: validates_format_of

2009-08-08 Thread Marnen Laibow-Koser
jhaagmans wrote: You will have to tell Ruby that this is a so- called double. I don't think that will help at all. However, I believe there's a method called validates_numericality_of that may be of use... Also, [0-9] is never necessary. Just use \d . Best, -- Marnen Laibow-Koser

[Rails] Re: Wamp doesn't work after installing with InstantRails

2009-08-08 Thread Marnen Laibow-Koser
Colin Law wrote: 2009/8/8 JC jtothe...@gmail.com: Thank you. You obviously won't be able to run them both at the same time as they are both web servers. That's untrue, unless Windows is even more broken than I thought. I routinely have 4 Web servers running on separate ports on my Mac

[Rails] Re: Question on the latest rails book

2009-08-08 Thread Marnen Laibow-Koser
Colin Law wrote: [...] I disagree with that, keep using the scaffold generator to add new stuff, it is by far the easiest way of generating the files generally needed. Then use this as the base on which to build your application specific stuff. Generally not, unless you happen to be

[Rails] Re: Wamp doesn't work after installing with InstantRails

2009-08-08 Thread Colin Law
2009/8/8 Marnen Laibow-Koser rails-mailing-l...@andreas-s.net: Colin Law wrote: 2009/8/8 JC jtothe...@gmail.com: Thank you. You obviously won't be able to run them both at the same time as they are both web servers. That's untrue, unless Windows is even more broken than I thought.  I

[Rails] How do I report a Rails bug?

2009-08-08 Thread James West
Just as the title sais really. How should I go about reporting a bug in Rails 2.3.2 and 2.3.3? Thanks James -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails:

[Rails] set only one observer to be active in a test

2009-08-08 Thread John Small
In my environment.rb I set a whole bunch of observers to be active by default. In testing I don't want to do that, I want to turn observers on and off as required so that I can isolate the things I'm testing. How do I do it? Ta John Small -- Posted via http://www.ruby-forum.com/.

[Rails] Re: set only one observer to be active in a test

2009-08-08 Thread bill walton
Hi John, On Sat, 2009-08-08 at 17:00 +0200, John Small wrote: In my environment.rb I set a whole bunch of observers to be active by default. In testing I don't want to do that, I want to turn observers on and off as required so that I can isolate the things I'm testing. How do I do it?

[Rails] Re: Open source rails 2 books

2009-08-08 Thread James West
Marnen Laibow-Koser wrote: James West wrote: [...] Go and buy the pdf AWDWR http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition I suspect the OP knows about AWDWR -- he was looking for open-source books. Your software has cost you nothing, putting your

[Rails] Re: Moving Permission Logic to the Model

2009-08-08 Thread CoolAJ86
That is exactly what I was looking for. Thanks so much Colin. On Aug 7, 5:17 pm, Colin Law clan...@googlemail.com wrote: 2009/8/7 CoolAJ86 coola...@gmail.com: Ideally what I would like to have happen: Contact.find (and .find_by_xyz, etc) will never return a contact unless

[Rails] Re: How do I report a Rails bug?

2009-08-08 Thread Rocco Di Leo
https://rails.lighthouseapp.com/dashboard On Sat, Aug 8, 2009 at 4:58 PM, James West rails-mailing-l...@andreas-s.net wrote: Just as the title sais really. How should I go about reporting a bug in Rails 2.3.2 and 2.3.3? Thanks James -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Open source rails 2 books

2009-08-08 Thread James West
Marnen Laibow-Koser wrote: Why is it a no-brainer? It's not like the money goes to support the Rails core team. AWDWR is recommended reading on the Rails website. Quote from the publishers The Pragmatic Bookshelf Sam Ruby is a prominent software developer who has made significant

[Rails] Re: has_many :through, multi model form unable to save new child

2009-08-08 Thread James West
OK this is a Rails bug. I have done extensive testing now and am able to prove that the code works on a has many but has_many :through fails. I'll report it as a bug if someone can tell me how? Thanks James -- Posted via http://www.ruby-forum.com/.

[Rails] Re: How do I report a Rails bug?

2009-08-08 Thread James West
Rocco Di Leo wrote: https://rails.lighthouseapp.com/dashboard On Sat, Aug 8, 2009 at 4:58 PM, James West rails-mailing-l...@andreas-s.net Thankyou :-) -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Postgresql schema support

2009-08-08 Thread Ilya Dyoshin
Good day, Reading this http://weblog.rubyonrails.org/2009/4/24/this-week-in-edge-rails I understand the structure 'schema.table_name' for postgresql is supported in Rails 2.3.x but I'm still having errors like relation schema.table_name doesn't exists Any idea? Best regards, Ilya Dyoshin

[Rails] Re: Rails based Point of Sale?

2009-08-08 Thread Cad Ho
First of all, I agree (and PLEASE listen) - DONT go web based. these systems are unreliable, and you will REGRET your purchase decision after a while, and your database will be DEAD and you will need to remake it, and it will waste a LOT of time. These people are just $$$ greedy, and computer

[Rails] Re: gem install mysql fails

2009-08-08 Thread Roger Pack
cmyk wrote: I am having the exact same issue. Any solutions yet? you need to install mysql client headers first, and then [since it's ruby 1.9] you'll need a newer version than what the gem provides either download 2.8.1 or a different gem http://isitruby19.com/mysql GL. -r -- Posted via

[Rails] Re: Rails app going nuts at 100% cpu

2009-08-08 Thread Roger Pack
Fernando Perez wrote: Damn it failed again! So I have to restart the hunt from the scratch, I might have not waited long enough to let it fail... Some things to help with a frozen app: strace http://eigenclass.org/hiki/ruby+live+process+introspection

[Rails] Re: ERROR: While generating documentation for mysql-2.7.3-x86-m

2009-08-08 Thread Roger Pack
c:/ruby/lib/ruby/gems/1.8/doc/mysql-2.7.3-x86-mswin32/rdoc --exclude ext --main README --quiet ext README docs/README.html (continuing with the rest of the installation) ca c'est le message qui s'affiche quand je fait gem install mysql que faire svp c'est normal :) -r -- Posted via

[Rails] Re: set only one observer to be active in a test

2009-08-08 Thread John Small
bill walton wrote: Hi John, On Sat, 2009-08-08 at 17:00 +0200, John Small wrote: In my environment.rb I set a whole bunch of observers to be active by default. In testing I don't want to do that, I want to turn observers on and off as required so that I can isolate the things I'm testing.

[Rails] Re: ActiveRecord - %= and % yielding different records

2009-08-08 Thread djolley
All of the above suggestions may be valid, however it does not explain how, once the OP has managed by fair means or foul to get hold of the member object that it manages to mutate between his two uses of it. OK. I want to jump back in here to make sure that Bill doesn't think that he did

[Rails] Re: acts_as_tree

2009-08-08 Thread djolley
Thanks, Marmen. I will give your undoubtedly good advice serious consideration. As I said, I'm going to have to take a break from this project for a couple of days anyway in order to tend to some other things that have arisen. Thanks again. ... doug

[Rails] Re: A weird database association

2009-08-08 Thread Jason Burgett
Thanks a ton. This one: http://dizzy.co.uk/ruby_on_rails/contents/self-referential-table-joins did the trick! Colin Law wrote: 2009/8/7 Jason Burgett rails-mailing-l...@andreas-s.net: friend_id: ineteger I would like to create relationship so I could do something like: friends_array =

[Rails] Re: ajax file upload question

2009-08-08 Thread Me
anyone? On Aug 7, 3:55 pm, Me chabg...@gmail.com wrote: I have thefileupload working, I have to place it outside my main form. Is there a way so I can have somewhere other than outside my form? This below is all after the submit button: div id=file %= render :partial = '/rsl/sitelist',

[Rails] Re: RichTextEditor

2009-08-08 Thread Ritvvij
I used tinymce. Will move onto ckeditor in next release. Thanks a lot. :-) On Aug 8, 12:36 am, James West rails-mailing-l...@andreas-s.net wrote: Ritvvij wrote: Hi, Which is the most advisable Rich Text Editor plugin / gem to use? Please advise I really liked tinymce, simple to use,

[Rails] Re: Wamp doesn't work after installing with InstantRails

2009-08-08 Thread Frederick Cheung
On Aug 8, 3:10 pm, Marnen Laibow-Koser rails-mailing-l...@andreas- s.net wrote: Colin Law wrote: 2009/8/8 JC jtothe...@gmail.com: Thank you. You obviously won't be able to run them both at the same time as they are both web servers.   That's untrue, unless Windows is even more

[Rails] Re: ActiveRecord - %= and % yielding different records

2009-08-08 Thread Colin Law
2009/8/8 djolley ddjol...@gmail.com: All of the above suggestions may be valid, however it does not explain how, once the OP has managed by fair means or foul to get hold of the member object that it manages to mutate between his two uses of it. OK.  I want to jump back in here to make sure

[Rails] Re: RichTextEditor

2009-08-08 Thread pharrington
On Aug 8, 12:59 pm, Ritvvij ritvi...@gmail.com wrote: I used tinymce. Will move onto ckeditor in next release. Thanks a lot. :-) On Aug 8, 12:36 am, James West rails-mailing-l...@andreas-s.net wrote: Ritvvij wrote: Hi, Which is the most advisable Rich Text Editor plugin / gem to

[Rails] Re: RichTextEditor

2009-08-08 Thread pharrington
On Aug 8, 1:34 pm, pharrington xenogene...@gmail.com wrote: On Aug 8, 12:59 pm, Ritvvij ritvi...@gmail.com wrote: I used tinymce. Will move onto ckeditor in next release. Thanks a lot. :-) On Aug 8, 12:36 am, James West rails-mailing-l...@andreas-s.net wrote: Ritvvij wrote:

[Rails] Re: Rails based Point of Sale?

2009-08-08 Thread Marnen Laibow-Koser
Cad Ho wrote: First of all, I agree (and PLEASE listen) - DONT go web based. these systems are unreliable, and you will REGRET your purchase decision after a while, and your database will be DEAD and you will need to remake it, and it will waste a LOT of time. These people are just $$$

[Rails] Re: Open source rails 2 books

2009-08-08 Thread Marnen Laibow-Koser
James West wrote: Marnen Laibow-Koser wrote: Why is it a no-brainer? It's not like the money goes to support the Rails core team. AWDWR is recommended reading on the Rails website. [...] David Heinemeier Hansson is the creator of the Rails framework. I got confused about the

[Rails] Re: Open source rails 2 books

2009-08-08 Thread James West
Marnen Laibow-Koser wrote: James West wrote: Marnen Laibow-Koser wrote: Why is it a no-brainer? It's not like the money goes to support the Rails core team. AWDWR is recommended reading on the Rails website. [...] David Heinemeier Hansson is the creator of the Rails framework. I

[Rails] Re: RichTextEditor

2009-08-08 Thread amit kumar
Hi, You can use fckeditor. It's very flexible..i used a lot. 2009/8/8 pharrington xenogene...@gmail.com On Aug 8, 12:59 pm, Ritvvij ritvi...@gmail.com wrote: I used tinymce. Will move onto ckeditor in next release. Thanks a lot. :-) On Aug 8, 12:36 am, James West

[Rails] Re: Top Senior Level RoR Engineer - Backend

2009-08-08 Thread Norm
Marta Daglow wrote: Senior Level RoR Engineer - Backend My client (located in SOMA) is a leading developer and provider of email marketing applications. This organization of 50 people is growing and has an impressive customer list. This is an international list.

[Rails] Re: Speeding up ActiveRecord Querying on very large joins?

2009-08-08 Thread Matt Jones
On Aug 7, 2:26 pm, Alpha Blue rails-mailing-l...@andreas-s.net wrote: Matt Jones wrote: Maybe not directly relevant, but have you considered that you may have normalized your database into nonfunctionality? From the queries you've shown, most of the tables have one data field(?!), a

[Rails] Re: how to get id of other table

2009-08-08 Thread s.ross
On Aug 8, 2009, at 2:16 AM, Kart wrote: Hi All, I have a doubt regarding join tables I'm having 2 models 1)Fac 2)Cont and both models have has and belong to many relationships so there are 3 tables 1)facs 2)conts 3)conts_facs then i'm fetching the data in controller as

[Rails] Re: Speeding up ActiveRecord Querying on very large joins?

2009-08-08 Thread Alpha Blue
Hi Matt, Again, you bring up some solid points, and some I agree with and others I don't. However, at this stage in my app (at least for this season) I can't alter or test any of what you speak about. I will definitely test a single table in development as the season progresses and see how

[Rails] proxy recommendations?

2009-08-08 Thread Hassan Schroeder
Sorta OT, sorta not. :-) I want to put a {something} in front of multiple app servers in order to be able to do rolling updates by quiescing traffic to one, updating it, starting it, sleep 'til ready, enable, //lather/rinse/repeat//. I know I've done this before with Apache httpd but the

[Rails] Date_select - Specifying an id for each selector fails

2009-08-08 Thread Lb2007
Because of some third party dependencies I'm trying to use a date_select helper (actually datetime, but they behave the same) whilst specifying an ID for each of the three selectors (day/month/ year). %= f.date_select :start, {:order = [:day, :month, :year]}, {:id = {:year = 'abc', :month =

[Rails] Re: Date_select - Specifying an id for each selector fails

2009-08-08 Thread Frederick Cheung
On Aug 8, 9:41 pm, Lb2007 yor...@gmail.com wrote: %= f.date_select :start, {:order = [:day, :month, :year]}, {:id = {:year = 'abc', :month =  'de', :day = 'xy'}} % The code above nearly works; the right selectors are generated in the right order, however, the IDs of each selector are the

[Rails] Re: proxy recommendations?

2009-08-08 Thread Frederick Cheung
On Aug 8, 10:53 pm, Hassan Schroeder hassan.schroe...@gmail.com wrote: Sorta OT, sorta not. :-) I want to put a {something} in front of multiple app servers in order to be able to do rolling updates by quiescing traffic to one, updating it, starting it, sleep 'til ready, enable,

[Rails] why partial doesn't work ?

2009-08-08 Thread Philip Gavrilos
im getting: undefined local variable or method `post' for #ActionView::Base:0x2673624 where in my code i have the mistake ? please help.. code at index.html.erb br/ h1welcome to my weblog!/h1br/ %= render :partial = posts/preview, :collection = @posts %br / %= link_to 'New post',

[Rails] Re: validates_format_of

2009-08-08 Thread Andrew Myers
Thanks all for your suggestions. It's definitely dropping the final 0 as Jaap suggested. I think I can work around it by changing the regular expression to: /\A[0-9]{1,5}\.[0-9]{1,2}\Z/ Also just as a side note I'm new to Ruby / Rails having previously worked with ColdFusion and Java, and

[Rails] Re: proxy recommendations?

2009-08-08 Thread Hassan Schroeder
On Sat, Aug 8, 2009 at 3:04 PM, Frederick Cheungfrederick.che...@gmail.com wrote: I haven't used it for exactly this but haproxy is generally pretty good about this sort of stuff - definitely worth looking at. Merci! Downloading now. -- Hassan Schroeder

[Rails] Re: split an array of hashes into an array of arrays of hashes

2009-08-08 Thread Nik
Hey Rob, Just got a very simple version to work. Based on your code def self.split_when(*value) results = [[]] each do |element| results.last element if value.include?(element)

[Rails] Re: why partial doesn't work ?

2009-08-08 Thread jhaagmans
In your partial, you use the variable post. But post doesn't exist. At least not as far as I can see. You've sent along a variable @posts and you will probably have to use that in some kind of for loop. For example: % for post in @posts do % % div_for post do % h2%= link_to_unless_current

[Rails] Re: why partial doesn't work ?

2009-08-08 Thread Philip Gavrilos
jhaagmans wrote: In your partial, you use the variable post. But post doesn't exist. At least not as far as I can see. You've sent along a variable @posts and you will probably have to use that in some kind of for loop. For example: % for post in @posts do % % div_for post do %

[Rails] Re: why partial doesn't work ?

2009-08-08 Thread jhaagmans
i did not understand my error here its because im newbie in ruby ( :P ) (if _preview was _post everything was fine.. i think that is because naming conventions right?) I'm not sure why that works. I would have to look into the code. I recommend you start your reading up on Rails using the

[Rails] Re: why partial doesn't work ?

2009-08-08 Thread Philip Gavrilos
jhaagmans wrote: i did not understand my error here its because im newbie in ruby ( :P ) (if _preview was _post everything was fine.. i think that is because naming conventions right?) I'm not sure why that works. I would have to look into the code. I recommend you start your reading up

[Rails] Re: Top Senior Level RoR Engineer - Backend

2009-08-08 Thread Jeremy Kemper
On Sat, Aug 8, 2009 at 12:17 PM, Normnormsche...@earthlink.net wrote: Marta Daglow wrote: Senior Level RoR Engineer - Backend My client (located in SOMA) is a leading developer and provider of email marketing applications. This organization of 50 people is growing and has an impressive

[Rails] Re: Princely Plugin: get nil.size error

2009-08-08 Thread Ash Forsyth
Did you ever figure out this problem? I have a working application and my code works on my laptop, but when I try it on our production server I come up with this error, but for the life of me I can't figure out why it is being thrown on one machine and not the other. NoMethodError: undefined