Re: [Rails] Re: Deep beginning

2010-07-25 Thread Jan Kadera
Guys, I really appreciate your help, but I can't read those manuals, because they are wrong. Those are written for people like you, who already understands, which is imho needles. For example on that api page, you recommended me for seek out the align tag...it is not there. Well, since I'm not a

Re: [Rails] YM4R/GM plug-in issue

2010-07-25 Thread Peter De Berdt
No, first of all, you need to fix your syntax error, like the error trace tells you. You haven't closed the create_table statement with an end. On 24 Jul 2010, at 20:49, jason white wrote: i'm creating an store finder application with the YM4R/GM plug-in. When i run rake db:migrate i get

[Rails] Debugging rspec2 and rails3

2010-07-25 Thread Miguel Ping
Hi, Is there a simple way to debug specs under rails3? I've installed rvm and I'm running ruby 1.9.2, I've tried alot of stuff to get my IDEs debugging my specs to no avail. I can run rdebug from the command line and debug it, but I cannot debug it from either RubyMine or NetBeans. The last time

[Rails] render :update with different controller does nothing

2010-07-25 Thread The Ceegee
Hi! I want to render 2 different actions - in different controller - when the user clicks on a button. I solved this with JS calls (Ajax.Updater) within the view, but wanted to take the app logic out of the view and into the controller. So I created a new controller action, calling the 2 updates

RE: [Rails] RE: Re: Creating reflective has_and_belongs_to

2010-07-25 Thread Piotr Jacek Puczynski
Hi. I was discussing the issue with one of my friends that teaches the databases course in the university and he said that more practically is to have this small duplication then to use slow outer join queries to list friends. The duplication in that case will not cause lot of space in

[Rails] Rails3 Finders - OR conditions

2010-07-25 Thread AppleII717
There just does not seem to be much information out their on Rails3 finders. The finders and chaining are basically awesome, at least if you are doing Model.where().where() which generates AND conditions. Can't find much on OR condition examples, except putting the or conditions in text in the

[Rails] Voting functionality like in YouTube

2010-07-25 Thread Ainar Abramovich
Imagine that you've created simple weblog by scaffolding and you want to add 'Vote Up' and 'Vote Down' (or 'like' 'dislike') functionality just like in YouTube, what steps are required, or someone have done it before or anyone could give me helpful links to some posts where is described how-to?

[Rails] You can't set a constant with namespace in the initializers?

2010-07-25 Thread Croplio
Help! in my rails controllers, there is a 'Admin' namespace. (My the structure of the controllers dir is like this : app/controllers: home_controller.rb ... admin/posts_controller.rb admin/pages_controller.rb The 'Admin' will automatically become a Module constant (I know it from the console:

[Rails] [Railsip addresses and spam manager for Rails

2010-07-25 Thread Roman Snitko
http://github.com/snitko/bananas -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

Re: [Rails] Re: Refactoring views ? Should public class methods be used in views?

2010-07-25 Thread Leonardo Mateo
On Sat, Jul 24, 2010 at 6:15 PM, Hans hans.marmo...@klockholm.se wrote: Thanks for the advice As that means a lot of controller instance variables I then had to define a presenter I'm not sure what you mean with this, but you can use helper methods to clean up your views and make them easier to

Re: [Rails] Testing an installed gem

2010-07-25 Thread Leonardo Mateo
Go toyour RVMROOT/gems/ruby-RUBYVERSION/gems/GEMNAME-GEMVERSION And look for the tests inside that directory. Probably there will be a rake task to run the tests On Sat, Jul 24, 2010 at 4:06 PM, dwormuth dworm...@post.harvard.edu wrote: I know how to run tests on my app, but how do I run tests

Re: [Rails] Re: Rails 3 RC

2010-07-25 Thread Greg Donald
On Sat, Jul 24, 2010 at 8:33 PM, Ryan Bigg li...@ruby-forum.com wrote: You have been around as long or longer than I have. Cry babies who think the Rails core or community owes them something can go cry somewhere else. Last I checked this is a place for technical discussions, not crying over

Re: [Rails] Re: Rails 3 RC

2010-07-25 Thread Rimantas Liubertas
Telling people to leave the community is one sure fire way for them to do that, and I'm sure deep down you don't want that to happen because without people we are without community. Not everyone is good for community. I won't be sad a bit if some leave. Regards, Rimantas -- You received

[Rails] need help installing Rails 3 on non-Intel Mac

2010-07-25 Thread Dave Aronson
I'm having trouble installing Rails 3 (on a Mac Powerbook G4 running OSX 10.5.8). Specifically, when I try gem install rails --pre it says: ERROR: Error installing rails: activesupport requires Ruby version = 1.8.7. But, if I do ruby --version, it says ruby 1.8.7 (2010-06-23 patchlevel

[Rails] Re: Re: Rails 3 RC

2010-07-25 Thread Ryan Bigg
Greg Donald wrote: Cry babies who think the Rails core or community owes them something can go cry somewhere else. Must you be so arrogant? What gives you the right to dictate where people should go? Please act like a respectable member. -- Posted via http://www.ruby-forum.com/. -- You

Re: [Rails] Re: Re: Rails 3 RC

2010-07-25 Thread Rimantas Liubertas
Must you be so arrogant? What gives you the right to dictate where people should go? Please act like a respectable member. Care to elaborate why do you have a right to tell others how to act? Regards, Rimantas -- You received this message because you are subscribed to the Google Groups

Re: [Rails] need help installing Rails 3 on non-Intel Mac

2010-07-25 Thread Hassan Schroeder
On Sun, Jul 25, 2010 at 2:13 PM, Dave Aronson googlegroups2d...@davearonson.com wrote: I'm having trouble installing Rails 3 (on a Mac Powerbook G4 running OSX 10.5.8).  Specifically, when I try gem install rails --pre it says: ERROR:  Error installing rails:        activesupport requires

[Rails] Re: Re: Re: Rails 3 RC

2010-07-25 Thread Ryan Bigg
Rimantas Liubertas wrote: Must you be so arrogant? What gives you the right to dictate where people should go? Please act like a respectable member. Care to elaborate why do you have a right to tell others how to act? I was not telling anybody else how to act. I was simply asking

[Rails] form_tag question

2010-07-25 Thread Anand Ramanathan
Hi, I am somewhat new to rails, and I have a question about form_tag: I have the following : %form_tag some_action do% ... and I have a route for posts/:id/some_action When I run this, I notice that (what seems miraculously), the app fills in the id while calling this route like:

Re: [Rails] Re: Re: Re: Rails 3 RC

2010-07-25 Thread Rimantas Liubertas
I was not telling anybody else how to act. I was simply asking (indicated by the word Please at the start of the sentence) that he act like a respectable member. **Please** do not misconstrue what I write. Cannot stop from telling (sorry, asking) others what to do? When why do you

[Rails] Re: form_tag question

2010-07-25 Thread Frederick Cheung
On Jul 25, 11:01 pm, Anand Ramanathan rcan...@gmail.com wrote: When I run this, I notice that (what seems miraculously), the app fills in the id while calling this route like: posts/12/some_action and even more surprisingly 12 is the id of the current post in my context. My question is:

[Rails] Re: Re: Rails 3 RC

2010-07-25 Thread Ryan Bigg
Rimantas Liubertas wrote: Telling people to leave the community is one sure fire way for them to do that, and I'm sure deep down you don't want that to happen because without people we are without community. Not everyone is good for community. I won't be sad a bit if some leave. So (and I

Re: [Rails] need help installing Rails 3 on non-Intel Mac

2010-07-25 Thread Dave Aronson
On Sun, Jul 25, 2010 at 17:32, Hassan Schroeder hassan.schroe...@gmail.com wrote: Multiple `ruby` executables -- maybe multiple `gem` executables too? What does `gem env` say? Hmmm, I think you're on the right path. It says: RubyGems Environment: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION:

Re: [Rails] need help installing Rails 3 on non-Intel Mac

2010-07-25 Thread Hassan Schroeder
On Sun, Jul 25, 2010 at 3:12 PM, Dave Aronson googlegroups2d...@davearonson.com wrote: RubyGems Environment:  - RUBYGEMS VERSION: 1.3.7  - RUBY VERSION: 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8  - RUBY EXECUTABLE:

[Rails] Re: Rails 3 RC

2010-07-25 Thread Michael Schuerig
On Monday 26 July 2010, Ryan Bigg wrote: As for the people who aren't good for this community, I so far see two of them in this entire thread and let me tell you: they aren't the people who are whining that Rails 3 isn't out yet. They're on the other side of that particular fence. Maybe they

[Rails] Re: Rails 3 RC

2010-07-25 Thread Ryan Bigg
Michael Schuerig wrote: On Monday 26 July 2010, Ryan Bigg wrote: As for the people who aren't good for this community, I so far see two of them in this entire thread and let me tell you: they aren't the people who are whining that Rails 3 isn't out yet. They're on the other side of that

[Rails] Testing problems: ActiveSupport

2010-07-25 Thread Manu meneillos
Hey everybody, I am trying to test a small application with a simple testing, but I get the following errors while using Aptana 2.0.5 with Ruby 1.9.1 and Rails 2.3.8(I know why I get the first one, but I'm not sure about the ActiveSupport errors): Exception: undefined method `screen_name' for

Re: [Rails] Re: form_tag question

2010-07-25 Thread Anand Ramanathan
Ah, ok - got it. Thanks! On Sun, Jul 25, 2010 at 3:05 PM, Frederick Cheung frederick.che...@gmail.com wrote: On Jul 25, 11:01 pm, Anand Ramanathan rcan...@gmail.com wrote: When I run this, I notice that (what seems miraculously), the app fills in the id while calling this route like:

Re: [Rails] Re: Re: Rails 3 RC

2010-07-25 Thread Greg Donald
On Sun, Jul 25, 2010 at 5:10 PM, Ryan Bigg li...@ruby-forum.com wrote: what you're saying is that the people who apparently are interested in the future of Rails should leave? Cry babies who mismanaged their *cough* business plans, based on a never-officially-announced Rails 3 release date,

[Rails] zipcode validation doesn't work

2010-07-25 Thread badnaam
I am trying to do a very basic zipcode validation(zip is a int field in mysql). validates_presence_of :zip, :message = Can't be blank validates_format_of :zip, :with = /^[0-9]{5}(-[0-9]{4})?$/, :message = Invalid Zipcode No matter whatever valid 5 digit zip I enter, this does not work, but If

[Rails] Re: zipcode validation doesn't work

2010-07-25 Thread badnaam
It seems both validations fail, the message says Can't be blank and shold be 5 digits, when its actually both. On Jul 25, 5:17 pm, badnaam asitkmis...@gmail.com wrote: I am trying to do a very basic zipcode validation(zip is a int field in mysql).  validates_presence_of :zip, :message = Can't

Re: [Rails] zipcode validation doesn't work

2010-07-25 Thread Hassan Schroeder
On Sun, Jul 25, 2010 at 5:17 PM, badnaam asitkmis...@gmail.com wrote: I am trying to do a very basic zipcode validation ** (zip is a int field in mysql) **  validates_format_of :zip, :with = /^[0-9]{5}(-[0-9]{4})?$/ Uh, you're trying to use a regular expression on an int? Off the top of my

[Rails] Re: zipcode validation doesn't work

2010-07-25 Thread badnaam
Thanks, I did change the field to varchar(5) as well, that doesn't work eitehr On Jul 25, 5:32 pm, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sun, Jul 25, 2010 at 5:17 PM, badnaam asitkmis...@gmail.com wrote: I am trying to do a very basic zipcode validation ** (zip is a int field

[Rails] Re: zipcode validation doesn't work

2010-07-25 Thread badnaam
Nevermind, I did not put zip in attr_accessible, that's why it was failing. Doh!! On Jul 25, 5:49 pm, badnaam asitkmis...@gmail.com wrote: Thanks, I did change the field to varchar(5) as well, that doesn't work eitehr On Jul 25, 5:32 pm, Hassan Schroeder hassan.schroe...@gmail.com wrote:

[Rails] Re: Rails 3 RC

2010-07-25 Thread Yehuda Katz
Hey, Thanks for your attempts to put together a coherent answer for what's happening based upon reading our public utterances. Unfortunately, we don't always realize that out comments on the bug tracker, on the Rails core list, on Twitter, etc. cannot easily be put together to form a coherent

[Rails] How can I force require a file in the console?

2010-07-25 Thread Charles Wang
I use rails-3.0.0.beta3 and ruby-1.9.2-preview3. I have defined some new methods in the application_controller.rb, and need to test them in the consle. If I changed some codes in the application_controller.rb. I should always restart the console. I have tried to use 'reload!' command, just

[Rails] Re: rails asset cache

2010-07-25 Thread Tom Mac
Hi Again I am facing a problem. I am using firefox with firebug.A portion of my code like %= stylesheet_link_tag styles,home, :cache = cache/all % Now in my local machine from firebug under net tab I disabled Browser cache .Then result I got like GET home http://localhost:3000/home 200 OK