Re: [Rails] Re: remove a table with migration

2011-08-22 Thread lionel Lioninho
2011/8/23 7stud -- > In rails 3.0.9: > > bundle exec rake db:rollback > > -- > 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 this group, send email to rubyonrails-talk@googlegro

[Rails] Re: remove a table with migration

2011-08-22 Thread 7stud --
In rails 3.0.9: bundle exec rake db:rollback -- 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 this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this gro

[Rails] Re: Rails 3 Success and Never giving up

2011-08-22 Thread 7stud --
Nice. I don't know if you care, but the 'Login' and 'Register' links are not positioned correctly in Safari 5.05. They are stacked on top of each other like this: Log In | Register which makes the Register link spill out below the black tab. The links are positioned properly in Firefox 3.5.7 -

[Rails] Re: Re: RJS error rails 1.2.3 + firefox 4 and above

2011-08-22 Thread Sathiyaraj Gurusamy
Colin Law wrote in post #1017814: > On 22 August 2011 10:32, Sathiyaraj Gurusamy > wrote: collapse are not work, it's just 'wrinkls'. >> I tried firefox with firebug. But it seems 200 Ok. When i click >> collapse button, I received RJS error, Object element is NULL.. > > There you are then, t

[Rails] Re: Trouble with Ruby on Rails

2011-08-22 Thread 7stud --
I had the same problem you did--because I used the sudo command at some point. Somehow that screwed everything up. So, I deleted the .rvm directory: > Then, I got an error stating: "/Users/taek/.rvm/rubies/ruby-1.9.2-p290/... $ rm -rf /Users/taek/.rvm Then I started over, and after install

[Rails] Rails 3 Success and Never giving up

2011-08-22 Thread Alpha Blue
Hi All, It's been a little more than 2 years since I first started working with Ruby on Rails. At that time, I was out of work and looking to get involved with development rather than infrastructure. Lo and behold, the Ruby language and the Rails framework was something that held a lot of intere

[Rails] Re: Trouble with Ruby on Rails

2011-08-22 Thread B. Taek K.
"J. Pablo Fernández" wrote in post #1017829: > Hi there, > > It helps if you break the problems in smaller parts and have a related > subject. > > Anyway, ruby -v should say 1.9.2. > > Can you show the result of doing rvm list and rvm 1.9.2 and then ruby > -v? --- Here

Re: [Rails] HTTP Basic Auth Popup

2011-08-22 Thread Jim Ruther Nill
2011/8/23 Tower He > Try to update your rails.js > > I guess this is the right way to do it. Thanks! For those having the same problems, you might want to check this article. http://weblog.rubyonrails.org/2011/2/8/csrf-protection-bypass-in-ruby-on-rails > 发自我的 iPhone > > 在 2011-8-23,9:21,Jim R

[Rails] jeditable make entire table row editable

2011-08-22 Thread Leonel *.*
jeditable helps you click on a table cell and edit it. but how could i click anywhere on the cell and make all the cells in that row editable? I have searched for about 3 hours and tried a few things and i can't seem to get it. has anybody done it before? can u point me to the right direction? e

Re: [Rails] HTTP Basic Auth Popup

2011-08-22 Thread Tower He
Try to update your rails.js 发自我的 iPhone 在 2011-8-23,9:21,Jim Ruther Nill 写道: Hi guys, After I've upgraded to Rails 3.0.10, the application I'm working on started having these http basic auth popups. At first I thought it was caused by me upgrading to 3.0.10 which could've expired all current s

Re: [Rails] Rails 3 and script/generate

2011-08-22 Thread Conrad Taylor
On Mon, Aug 22, 2011 at 5:50 PM, soldier.coder < geekprogrammer...@googlemail.com> wrote: > what is rails 3 equivalent to script/generate? I am trying to use > Twitter-OAuth and it has a generator and I am not sure how to use it. > > The documentation is all for rails 2.3. Any ideas are apprecia

[Rails] remove a table with migration

2011-08-22 Thread coolesting
HI, guys, How to remove a table with migration, i saw a drop down method in migration created file , how can i use that ? thank you. -- 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-talk@go

[Rails] HTTP Basic Auth Popup

2011-08-22 Thread Jim Ruther Nill
Hi guys, After I've upgraded to Rails 3.0.10, the application I'm working on started having these http basic auth popups. At first I thought it was caused by me upgrading to 3.0.10 which could've expired all current sessions. But it's not that. Everytime I try to delete a record, I get the popup

[Rails] Rails 3 and script/generate

2011-08-22 Thread soldier.coder
what is rails 3 equivalent to script/generate? I am trying to use Twitter-OAuth and it has a generator and I am not sure how to use it. The documentation is all for rails 2.3. Any ideas are appreciated! -- You received this message because you are subscribed to the Google Groups "Ruby on Rail

[Rails] Re: Routing error (route not found) but only for destroy action.

2011-08-22 Thread 7stud --
Frederick Cheung wrote in post #1017860: > On Aug 22, 1:28pm, 7stud -- wrote: > >> Once you have a way to execute a method when you have the name of the >> method as a string, you can get creative: >> >> model = item_to_destroy.class.to_s.downcase >> >> self.send("#{model}_path", item_to_delete) >

Re: [Rails] getting the results of another person in the same controller

2011-08-22 Thread David Chua
Hi Kapil, I'm not sure if I understand you correctly but if you're trying to pull information created by another user, you should store whatever data you want to extract into a database first and then subsequently pull it with your other user. So for example, # Mentor model Mentor has_many cours

[Rails] Paperclip nested resources problem

2011-08-22 Thread Remco Swoany
My models: class Country < ActiveRecord::Base has_many :regions has_many :assets, :dependent => :destroy accepts_nested_attributes_for :assets end class Region < ActiveRecord::Base belongs_to :country has_many :appartments has_many :assets, :dependent => :destroy accepts_nested_at

[Rails] Re: How do I generate the Rspec file for an already existing model in Rails 3?

2011-08-22 Thread Ezequiel Schwartzman
Well, calling scaffold with flag seems to do the trick. The only con is that I have to say no for each file, since Ynaqdh doesn't have a "no to all" option =/ -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails

[Rails] Re: How do I generate the Rspec file for an already existing model in Rails 3?

2011-08-22 Thread David Chelimsky
On Aug 22, 2:18 pm, Ezequiel Schwartzman wrote: > I've seen guides for Rspec that say to use rspec_model script, but in > Rails 3 you don't have the script folder, and the only Rspec generator > that I have is rspec:install. > > The other way is generate them automatically when scaffolding, but I

[Rails] How do I generate the Rspec file for an already existing model in Rails 3?

2011-08-22 Thread Ezequiel Schwartzman
I've seen guides for Rspec that say to use rspec_model script, but in Rails 3 you don't have the script folder, and the only Rspec generator that I have is rspec:install. The other way is generate them automatically when scaffolding, but I already have the model, controller and view files created

[Rails] multiple foreign keys in one table reference the same table column

2011-08-22 Thread joan qin
Here is my table structure: keyterms: id, key_word, primary key (id) user_keywords: id, user_id, expertise_keyterm_id, partners_keyterm_id, primary key(id), foreign key(expertise_keyterm_id), foreign key(partners_keyterm_id) In UserKeyword model: class UserKeyword < ActiveRecord::Base belongs_t

[Rails] Re: how to put the form in index action

2011-08-22 Thread J . Pablo Fernández
I'm not sure what you mean by message, reply and so on. Seems something specific of your app. When I have to display the form on the index action I put the form in a separate partial, which is a good idea anyway and the default since Rails 3.1 or 3.0, like _form, and I make sure both index and

[Rails] Authlogic and Authlogic-OID Question

2011-08-22 Thread Ants Pants
Hello,I was wondering if anyone was using these and if so, hopefully you could explain something to me. When User::create is called when using an open_id, User::create gets called twice and the second call clears out the session. The first call to User::create deletes a row from open_id_authentic

[Rails] Re: Re: Validates attributes that aren't even being changed

2011-08-22 Thread Leonel *.*
Chirag Singhal wrote in post #1017423: > Try this > > :unless => Proc.new {|user| user.password.nil?} > > Essentially it will check if you are sending a password attribute to the > user or not while updating the user record and will check for this > validation only if password attribute is present.

Re: [Rails] Re: how can I rewrite this route ?

2011-08-22 Thread Rob Biedenharn
On Aug 22, 2011, at 8:13 AM, Surya wrote: In my opinion you should let controller handle the size of your list, if it is 'programs/1', 'programs/2' or 'programs/3' it will look for :controller => programs, :action => your_defined_action . So, in there in your action you just need to manipu

[Rails] Re: Routing error (route not found) but only for destroy action.

2011-08-22 Thread Frederick Cheung
On Aug 22, 1:28 pm, 7stud -- wrote: > Once you have a way to execute a method when you have the name of the > method as a string, you can get creative: > > model = item_to_destroy.class.to_s.downcase > > self.send("#{model}_path", item_to_delete) > or polymorphic_path(item_to_delete) (which is

[Rails] Re: Mongrel::HttpParserError: Invalid HTTP format, parsing fails

2011-08-22 Thread Frederick Cheung
On Aug 22, 1:18 pm, "Gaurav S." wrote: > Same problem facing here got any solution? > Well if you're saying that the mime type is application/x-www-form- urlencoded but you're sending arbitrary binary data, then mongrel is quite rightly saying that what you've given to it isn't an application/

Re: [Rails] Jquery to rails 3

2011-08-22 Thread Surya
just add jquery reference in your application.html.erb layout. For more info : http://railscasts.com/episodes/136-jquery :) On Mon, Aug 22, 2011 at 5:55 PM, ashok k. wrote: > hoe to connect the jquery to rails3 please tell me the solution > > -- > Posted via http://www.ruby-forum.com/. > > -- >

[Rails] how to put the form in index action

2011-08-22 Thread Vivek Dwarakacharla
how to put the current user sending and the receiving messages in one form with out duplicate receiver id? if possible please give the solution? and also in the same form hoe to put the reply action for sending the messages to the receiver id? tell me the solution with any example? Thanks, -

[Rails] Re: Routing error (route not found) but only for destroy action.

2011-08-22 Thread 7stud --
Stefano wrote in post #1017840: > Hi guys > > I have many different models and I want to reuse the same code for the > delete button. > So in my helper i have: > > def delete_button(item_to_delete) > button_to t('buttons.delete'), :action => "destroy", :controller > => item_to_delete.class.to_s

[Rails] Re: Routing error (route not found) but only for destroy action.

2011-08-22 Thread Frederick Cheung
On Aug 22, 12:48 pm, Stefano wrote: > Hi guys > > I have many different models and I want to reuse the same code for the > delete button. > So in my helper i have: > > def delete_button(item_to_delete) >     button_to t('buttons.delete'), :action => "destroy", :controller > => item_to_delete.cla

Re: [Rails] getting the results of another person in the same controller

2011-08-22 Thread Colin Law
On 22 August 2011 12:47, Kapil K. wrote: > please tell me how to get the  information of one user by the > another with in the same controller? is it possible? please tell me the > solution with some example ? @other_user = User.where( some conditions ) > and also tell me how to get the related

[Rails] Jquery to rails 3

2011-08-22 Thread ashok k.
hoe to connect the jquery to rails3 please tell me the solution -- 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 this group, send email to rubyonrails-talk@googlegroups.com. To unsubsc

[Rails] Re: Mongrel::HttpParserError: Invalid HTTP format, parsing fails

2011-08-22 Thread Gaurav S.
Same problem facing here got any solution? Regards Gaurav Saini Uma Mahe wrote in post #932433: > Hi All, > >How to solve this issue ? > Thu Aug 12 10:49:15 +0530 2010: HTTP parse error, malformed request > (127.0.0.1): # fails.> > >I'm working with the drag and drop files upload

Re: [Rails] Re: how can I rewrite this route ?

2011-08-22 Thread Surya
In my opinion you should let controller handle the size of your list, if it is 'programs/1', 'programs/2' or 'programs/3' it will look for :controller => programs, :action => your_defined_action . So, in there in your action you just need to manipulate the params[:id] and according to it generate y

[Rails] Re: how can I rewrite this route ?

2011-08-22 Thread Erwin
thanks , That's better than what I did first, but is there any way to match to a specific name ( short_list, medium_list, long_list ) based upon the parameter 1, 2, 3 On Aug 22, 1:12 pm, Surya wrote: > try to make it like this: > > match "programs/:id" => "Programs#your_action_name", :as => :

[Rails] juggernaut server

2011-08-22 Thread ashok k.
how to chat by using the juggernaut server in rails 3 please tell me the solution for this one. -- 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 this group, send email to rubyonrails-t

[Rails] Routing error (route not found) but only for destroy action.

2011-08-22 Thread Stefano
Hi guys I have many different models and I want to reuse the same code for the delete button. So in my helper i have: def delete_button(item_to_delete) button_to t('buttons.delete'), :action => "destroy", :controller => item_to_delete.class.to_s.downcase.pluralize end Normally i work with pa

[Rails] getting the results of another person in the same controller

2011-08-22 Thread Kapil K.
please tell me how to get the information of one user by the another with in the same controller? is it possible? please tell me the solution with some example ? and also tell me how to get the related information when the user using the select list? sir, i have two control panels one for mentor

[Rails] Re: Rails, jquery and Ajax

2011-08-22 Thread 7stud --
Paul Bergstrom wrote in post #1017792: > 7stud -- wrote in post #1017753: >> This is what I've been doing for jquery: > >> jquery.rails.js > > > Thank you. Now it works. :-) > > So I've been sitting with this problem for a long time and this was what > I missed. Did I miss it or was it poorly expla

Re: [Rails] how can I rewrite this route ?

2011-08-22 Thread Surya
try to make it like this: match "programs/:id" => "Programs#your_action_name", :as => :list So in your controller 'Programs' you are able to handle the request with the "id" which will be variable, and the path can be called by 'list_path'. The action you'll call here will handle the request and

[Rails] Re: Trouble with Ruby on Rails

2011-08-22 Thread 7stud --
> It seems like OS X 10.6.8 already comes with Ruby 1.8.7, Yes, macs come with ruby already. > and should it be the reason behind this problem? No 1) Say this out loud: DON'T EVER USE the sudo command WITH RVM. Shout that out your window ten times. Next get a tablet of paper, and write

[Rails] how can I rewrite this route ?

2011-08-22 Thread Erwin
I would like to have some more friendly URLS ... I have some routes , with parameters I would like to rewrite but I don't know if it's possible : /programs?list=1 => /short_list /programs?list=2 => /medium_list /programs?list=3 => /long_list thanks for your feedback -- Y

[Rails] Re: Trouble with Ruby on Rails

2011-08-22 Thread J . Pablo Fernández
Hi there, It helps if you break the problems in smaller parts and have a related subject. Anyway, ruby -v should say 1.9.2. Can you show the result of doing rvm list and rvm 1.9.2 and then ruby -v? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: T

Re: [Rails] Re: search engine

2011-08-22 Thread J . Pablo Fernández
Yes, of course, thinking-sphinx... well there are other gems but I haven't tried them. Even then, you have to maintain Sphinx itself running, which sometimes can be a pain. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this di

Re: [Rails] Re: search engine

2011-08-22 Thread sandip ransing
use thinking-sphinx gem 2011/8/22 J. Pablo Fernández > You could just use SQL if your needs are very simple. It's a > straightforward solution, just do a query using LIKE and wildcards, but be > careful not to open your app to SQL injection. > > If that's not enough, several databases have full

[Rails] Re: search engine

2011-08-22 Thread J . Pablo Fernández
You could just use SQL if your needs are very simple. It's a straightforward solution, just do a query using LIKE and wildcards, but be careful not to open your app to SQL injection. If that's not enough, several databases have full text search, which may or may not be good. The next step is t

[Rails] Trouble with Ruby on Rails

2011-08-22 Thread btaek
Some background info: I am an OS X user, and my MAC system is OS X 10.6.8(snow leopard). @1st problem (regarding Ruby on Rails installation): I have installed ruby "1.9.2" with RVM. When I typed "ruby -v" command in terminal after installation, it says that the ruby version I have is "1.8.7". Stra

Re: [Rails] friends i am a beginner in ruby on rails help me i need trier

2011-08-22 Thread Shuraeff Valentin
по русски умееш писать ? On Mon, Aug 22, 2011 at 10:59 AM, sasa btechit wrote: > friends i am a beginner in ruby on rails help me > i need trier > > -- > 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

[Rails] has_many :through behaviour trouble

2011-08-22 Thread Guillem Vidal
Hi there! I have the following classes, but I don't undersant why, when I try to create some class Wishlist < ActiveRecord::Base has_many :activated_user_wishlists, :class_name => "UserWishlist", :conditions => {:registered => true} has_many :users_registered, :through => :activated_user_wish

[Rails] search engine

2011-08-22 Thread Annapoorna R
hello all I am trying to develop a search functionality that performs searchin by user id, searching by name as part of my application in rails3 .. could anybody suggest ? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this

Re: [Rails] Re: RJS error rails 1.2.3 + firefox 4 and above

2011-08-22 Thread Colin Law
On 22 August 2011 10:32, Sathiyaraj Gurusamy wrote: > Colin Law wrote in post #1017798: >> On 18 August 2011 07:36, Sathiyaraj Gurusamy >> wrote: >>> Hi, >>> >>> In my application I used in admin module to expand and collpase >>> functionality using ajax(link_to_remote) method. It's working fine

[Rails] Re: RJS error rails 1.2.3 + firefox 4 and above

2011-08-22 Thread Sathiyaraj Gurusamy
Colin Law wrote in post #1017798: > On 18 August 2011 07:36, Sathiyaraj Gurusamy > wrote: >> Hi, >> >> In my application I used in admin module to expand and collpase >> functionality using ajax(link_to_remote) method. It's working fine in >> mozilla 3 and below version.. >> >> But when I using in

Re: [Rails] friends i am a beginner in ruby on rails help me i need trier

2011-08-22 Thread Jatin kumar
u need trier On Mon, Aug 22, 2011 at 12:29 PM, sasa btechit wrote: > friends i am a beginner in ruby on rails help me > i need trier > > -- > 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 rubyon

[Rails] friends i am a beginner in ruby on rails help me i need trier

2011-08-22 Thread sasa btechit
friends i am a beginner in ruby on rails help me i need trier -- 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-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrai

Re: [Rails] RJS error rails 1.2.3 + firefox 4 and above

2011-08-22 Thread Colin Law
On 18 August 2011 07:36, Sathiyaraj Gurusamy wrote: > Hi, > > In my application I used in admin module to expand and collpase > functionality  using ajax(link_to_remote) method. It's working fine in > mozilla 3 and below version.. > > But when I using in mozilla 4 expand functinality was working f

Re: [Rails] Rails 3.1 without breaking

2011-08-22 Thread Conrad Taylor
Sent from my iPad On Aug 20, 2011, at 8:14 AM, Rodrigo Ruiz wrote: > Hi, I'd like some help to install rails 3.1 without breaking old projects > that use rails 3.0.9. > > If I install rails 3.1, will it delete rails 3.0.9? > > I don't understand much about it, but I think all my gems are in