[Rails] Re: ruby-openid is breaking my rake

2008-11-05 Thread Pod Caster
Hi, any ideas anyone why a gem wouldn't be found even if I can use it? And it would break the rake command? I guess it is some configuration but I can't get it to work. Cheers. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this mes

[Rails] Introducing testing in the middle of development, advice?

2008-10-31 Thread Pod Caster
Hi, I want to get into testing. I really do. However I find it problematic to jump over testing when I know my rails code is not perfect. I'm not a ror expert yet so most of my energy is spent in development. I have some questions: - How easy/hard is to introduce rspec in the middle of developm

[Rails] Link_to + PUT + restful routes problem

2008-10-18 Thread Pod Caster
Hi, I'm trying to use link_to to access the Update action + add some extra parameters. I'm using the default rest routes. I can't get it working. When I use: <%= link_to ' Accept', invitation_path, :method => :put, :id => '1', :command => 'accept' %> I can get into the Update action but the pa

[Rails] Re: Seach users to invite, how ineficient is what I use?

2008-10-17 Thread Pod Caster
Any comments anyone? I guess my code is perfect otherwise 8-) Maybe I didn't formulate the right question... Regards -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Seach users to invite, how ineficient is what I use?

2008-10-16 Thread Pod Caster
Hi, I'm using HasManyFriends plugin. I'm listing friends so users can request friendship. From those I have to remove the admin, the current user and users that are friends already. For that I used this: def index @users = User.find(:all) render :inline => "<% for user in @users

[Rails] find_by_user_id_and_id question

2008-10-14 Thread Pod Caster
Hi, I wondering about the next: The book Advance Rails states that using def show @message = Message.find_by_user_id_and_id(current_user.id, params[:id]) end Should return RecordNotFound if the user that tries to view a message is not the one that created it. But what I get is: You h

[Rails] Re: Are references and Foreign keys the same thing?

2008-10-11 Thread Pod Caster
Hi, Yeah now I checked about foreign key constraints for MySql: http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html I think I understand it a bit better now. Using references or something like t.integer :project_id help creating the relations between tables, and help with

[Rails] Re: Are references and Foreign keys the same thing?

2008-10-11 Thread Pod Caster
Hi, thanks Fred. Yes you are right I'm after FK constraints. And I guess that a way to do that is for example using this in a migration file: execute "alter table user_images add constraint fk_wi_user foreign key (user_id) references users(id)" Regards -- Posted via http://www.ruby-forum.com/

[Rails] Are references and Foreign keys the same thing?

2008-10-11 Thread Pod Caster
Hi, I'm getting confused, are references and foreign keys the same thing really? http://www.jonathansng.com/ruby-on-rails/foreign-key-migrations-in-rails-20/ Is there a good example on FKs? I'd like to see how it goes in practice, for example how deleting the parent record would delete any exis

[Rails] Re: 'Admin::UsersHelper' is already used problem

2008-10-07 Thread Pod Caster
Erol Fornoles wrote: > On Oct 8, 1:37?pm, "Robby Russell" <[EMAIL PROTECTED]> wrote: >> Do you happen to have a model named Admin? > > Nvm what I just said earlier. It's a confirmed bug: > > http://rails.lighthouseapp.com/projects/8994/tickets/545 > > One way I found around it is to temporarily

[Rails] Re: How to generate this request with NET::HTTP

2008-09-22 Thread Pod Caster
Hi, Here's how I got the thing working: http = Net::HTTP.new('www.something.com') resp = http.post('/script.php?op=publish', 'ch=0&cnt=something') Regards -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: How to generate this request with NET::HTTP

2008-09-22 Thread Pod Caster
Thanks again Fred. I used Ethereal now. And yes the arguments are there correctly! What I found is that the next line: Net::HTTP.post_form(URI.parse('http://www.something.com/script.php?op=publish'), {"ch" => 0, "cnt" => "something"}) Produces: POST http://www.something.com/script.php HTTP/1

[Rails] Re: How to generate this request with NET::HTTP

2008-09-22 Thread Pod Caster
I was using puts to check it but I'm not sure I doing it correctly. How can I see the generated request before it is sent by post_form? I can't seem to catch it with the Fiddler tool. Thanks. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You re

[Rails] Re: How to generate this request with NET::HTTP

2008-09-21 Thread Pod Caster
Hi, any hints anyone? Thanks. -- 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@googlegroup

[Rails] How to generate this request with NET::HTTP

2008-09-21 Thread Pod Caster
Hi, Whith NET::HTTP.post_form how can I generate the next request? POST /script.php?op=publish HTTP/1.1 ... ... ch=0&cnt=something - When I use: res = Net::HTTP.post_form(URI.parse('http://www.xxx.com/script.php?op=publish'), {"ch" => 0, "cnt" => "something"}) http://www.xxx.

[Rails] Re: Reverse Ajax with RoR - what is the best option?

2008-09-20 Thread Pod Caster
Hi, Does anyone have any opinion on the approach described here? http://www.danielcadenas.com/2008/08/reverse-ajax-and-prototype.html Cheers. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] Best DB structure - any advice?

2008-09-20 Thread Pod Caster
Hi, I have a basic question about how to setup my models and DB structure. I will have an app that allow users to upload pictures. Pictures are related to cities. Users can upload pictures for many cities. The visitors can view the pictures based on the city they are visiting. So when they do a