[Rails] Re: Same partial different results

2010-02-09 Thread brianp
Hey Colin, thanks for the reply. I did think to check for that and un-fortunately the html for the prompt (first option) is not generated at all. It immediately skips to the first object in the list, just as if the prompt wasn't there at all. On Feb 8, 1:43 am, Colin Law clan...@googlemail.com

[Rails] Re: Same partial different results

2010-02-09 Thread brianp
Just found my problem. %= collection_select(:Vehicle, box, list, box, box, I previously had :vehicle. Which I'm assuming wasn't actually being recognized as Model type due to case. Weird that it still functioned on the index but broke on the show. Either way it works now. Weird little glitch I

[Rails] PHP - Ruby On Rails: advice wanted on customer management ( dns / email )

2010-02-09 Thread rubybox
Ive searched this group and google Groups and hope this topic will get approved since ruby on rails tak seems the only place I could ask. CURRENT SITUATION: Currently Im using a Plesk, PHP, Ruby Enterprise VPS with the plesk for managing customers ( email, passwords, etc ) Mainly all my websites

[Rails] Re: Why are double sided polymorphic relationships lacking in Rails?

2010-02-09 Thread tsenart
Very cool! Thanks for the answer. But inverse associations are only a component of those double sided polymorphic associations. At the present you can only make one sided associations. Table talking it means the following: Single sided polymorphic: ---

[Rails] Weird behavior on Ruby 1.9.1

2010-02-09 Thread rodrigo3n
Hello everyone, I've recently installed Rails 3 and beginning using it, but I found something strange: With a simple app, with no additional gems required I test using REE and all rails commands (rails server, rails g, rails console, rake db:wtv and all) work properly. But when i test the same app

[Rails] Rails3 pre and protect_from_forgery

2010-02-09 Thread bshelton229
I've almost entirely converted a rails 2.3.5 app to 3pre. I'm having some trouble with protect_from_forgery. I had protect_from_forgery set in application_controller.rb, but run some uploadify ajax stuff in one of my controllers, where I had protect_from_forgery, :except = :add_file set. In rails

[Rails] Re: Rails / Rack version mismatch

2010-02-09 Thread Sean
Did you get this solved I have similar issue and am stuck On Feb 4, 9:28 am, RonL rlamb...@gmail.com wrote: I attempted to install rails, with these error messages: $ sudo gem install rails ERROR:  Error installing rails:         actionpack requires rack (~ 1.0.0, runtime) $ sudo gem

[Rails] Re: dynamic drop downs for product search [SOLVED]

2010-02-09 Thread brianp
So I have implemented my own version of dynamic drop down menus. (This is my first rails project nearing an end. Feel free to point out better methods, criticism taken construction-ally) So one thing to keep in mind with the drop downs are they don't have to be used in a linear fashion. The three

[Rails] some success at last, and some questions

2010-02-09 Thread Bigos
Hi Everyone, I've been using Ruby roughly since 2003, but I never could understand Rails nor do something meaningful with them. At last thanks to wonderful people from Rails Guides at http://guides.rubyonrails.org/getting_started.html I began to understand Rails. At the moment I am trying to do

Re: [Rails] PHP - Ruby On Rails: advice wanted on customer management ( dns / email )

2010-02-09 Thread Peter De Berdt
On 09 Feb 2010, at 09:45, rubybox wrote: CURRENT SITUATION: Currently Im using a Plesk, PHP, Ruby Enterprise VPS with the plesk for managing customers ( email, passwords, etc ) Mainly all my websites use a custom account for each customer with its own /httpdocs to serve the php files from (

[Rails] Re: some success at last, and some questions

2010-02-09 Thread Frederick Cheung
On Feb 9, 9:20 am, Bigos ruby.obj...@googlemail.com wrote: So here are my questions: 1 Is it appropriate to put such code here? No. You don't really want any code in your view, other than the very bare minimum. Sounds like you want to put a l lot of this in a view helper 2 how can I

[Rails] Re: some success at last, and some questions

2010-02-09 Thread Bigos
On Feb 9, 9:24 am, Frederick Cheung frederick.che...@gmail.com wrote: On Feb 9, 9:20 am, Bigos ruby.obj...@googlemail.com wrote: So here are my questions: 1 Is it appropriate to put such code here? No. You don't really want any code in your view, other than the very bare minimum.

[Rails] Re: Why are double sided polymorphic relationships lacking in Rails?

2010-02-09 Thread tsenart
ActiveRecord supports one-to-many polymorphic associations but not many-to-many polymorphic associations. Thats what I wanted. I emulate that behavior like this: We have three models: - Article, Asset and Relationship class Article PolyRecord habtm_polymorphs [:assets] end class Asset

Re: [Rails] PHP - Ruby On Rails: advice wanted on customer management ( dns / email )

2010-02-09 Thread shyam mohan
Hi http://fotolink.adeveam.co.uk/login user name: admin password: pass try this if u find this ok ask me a customised CRM. Regards, Shyam +91-971-618-9650 sh...@crypsis.net On Tue, Feb 9, 2010 at 2:15 PM, rubybox voorr...@gmail.com wrote: Ive searched this group and google Groups and

[Rails] Using YM4R/GM plugin in rails.

2010-02-09 Thread senling
I have installed YM4R/GM plugin. I'm using Rails 2.3.5. After installing, i could'nt start my application. it shows, Application error Rails application failed to start properly. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

Re: [Rails] Re: Why are double sided polymorphic relationships lacking in Rails?

2010-02-09 Thread Mat Brown
On Tue, Feb 9, 2010 at 05:40, tsenart tsen...@gmail.com wrote: ActiveRecord supports one-to-many polymorphic associations but not many-to-many polymorphic associations. Thats what I wanted. I emulate that behavior like this: We have three models: - Article, Asset and Relationship class

Re: [Rails] Re: Object Version Control, or at least edit log

2010-02-09 Thread Mat Brown
On Mon, Feb 8, 2010 at 23:37, Erol Fornoles erol.forno...@gmail.com wrote: On Feb 9, 11:48 am, PsiPro arjes...@gmail.com wrote: Hello all, I need to create a object history, as I'll have multiple editors for a site i am working on. Of course it would be great to have the ability to restore

Re: [Rails] Weird behavior on Ruby 1.9.1

2010-02-09 Thread Conrad Taylor
On Mon, Feb 8, 2010 at 3:51 PM, rodrigo3n rodrig...@gmail.com wrote: Hello everyone, I've recently installed Rails 3 and beginning using it, but I found something strange: With a simple app, with no additional gems required I test using REE and all rails commands (rails server, rails g, rails

[Rails] Re: How to call javascript function in A site?

2010-02-09 Thread junyoung kim
actually, this is not what i want to do ;) sorry my poor english sentences made you misunderstand it. okay. if there is a general website like amazon, the site has plenty of javascript function. the one of them is func_a() function what I want to call it. in my local, there is a ruby script

[Rails] Re: PHP - Ruby On Rails: advice wanted on customer management ( dns / email )

2010-02-09 Thread rubybox
No matter how much disadvantages and quirks I think Plesk and cPanel   have, if you want to provide your customer with a fancy pancy control   panel that they can understand and you can manage easily, using either   one of those is a necessary evil. Best regards Peter De Berdt I use

Re: [Rails] Re: How to call javascript function in A site?

2010-02-09 Thread Narendra sisodiya
following code might help you % if rails_condition% script func_a(arg1,arg2,arg3); /script %end% Regards, Naren On Tue, Feb 9, 2010 at 5:21 PM, junyoung kim li...@ruby-forum.com wrote: actually, this is not what i want to do ;) sorry my poor english sentences made you misunderstand it.

Re: [Rails] Re: PHP - Ruby On Rails: advice wanted on customer management ( dns / email )

2010-02-09 Thread Peter De Berdt
On 09 Feb 2010, at 13:10, rubybox wrote: No matter how much disadvantages and quirks I think Plesk and cPanel have, if you want to provide your customer with a fancy pancy control panel that they can understand and you can manage easily, using either one of those is a necessary evil. Best

[Rails] Re: ECONNABORTED: An established connection was aborted

2010-02-09 Thread Adam Stegman
On Feb 8, 1:13 pm, Ralph Shnelvar li...@ruby-forum.com wrote: What, exactly, does   ECONNABORTED: An established connection was aborted by the software in your   host machine. mean? So ... let's start with the most basic of questions: What's a connection? The two-way communication between

[Rails] Re: Object Version Control, or at least edit log

2010-02-09 Thread Marnen Laibow-Koser
Erol Fornoles wrote: On Feb 9, 11:48�am, PsiPro arjes...@gmail.com wrote: Thanks, Brian There's http://wiki.github.com/collectiveidea/acts_as_audited/. That might work for your use case. Yup. Or put something similar in a trigger. More work but more airtight. Best, --  Marnen

[Rails] Re: Controller methods over instance variables?

2010-02-09 Thread Adam Stegman
On Feb 8, 9:16 am, Marnen Laibow-Koser li...@ruby-forum.com wrote: Andrew France wrote: On 09/02/10 01:32, Marnen Laibow-Koser wrote: Andrew France wrote: Hi, I was thinking whether it would be more elegant for a view to call methods on the controller rather than rely on instance

[Rails] Re: PHP - Ruby On Rails: advice wanted on customer managem

2010-02-09 Thread Marnen Laibow-Koser
rubybox wrote: No matter how much disadvantages and quirks I think Plesk and cPanel � have, if you want to provide your customer with a fancy pancy control � panel that they can understand and you can manage easily, using either � one of those is a necessary evil. Best regards Peter De

[Rails] Re: acts_as_tree question

2010-02-09 Thread Marnen Laibow-Koser
db_333 wrote: Yes, this was helpful, and I appreciate it. Thanks for your reply. On Feb 8, 11:29�pm, Gianluca Tessarolo You probably don't want acts_as_tree in any case. Awesome_nested_set is much more efficient. Best, --  Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org --

[Rails] Re: Getting Twitter usernames

2010-02-09 Thread Marnen Laibow-Koser
Rails ROR wrote: Hi all, I want to display the list of all twitter user names.' Please suggest me something on that Read the Twitter API docs. This has nothing to do with Rails, though Twitter-Auth is great for connecting Rails to Twitter. Getlists is a method which i have seen it

[Rails] Re: Re: Why are double sided polymorphic relationships lack

2010-02-09 Thread Marnen Laibow-Koser
Mat Brown wrote: On Tue, Feb 9, 2010 at 05:40, tsenart tsen...@gmail.com wrote: �habtm_polymorphs [:articles] � �rev = Relationship.new :origin = self.destination, :destination �def self.habtm_polymorphs(associations, options={}) � �has_many pjoin, :as = pfrom � � �}) � � � �args =

[Rails] Re: Controller methods over instance variables?

2010-02-09 Thread Andrew France
On Feb 10, 12:09 am, Adam Stegman adam.steg...@gmail.com wrote: On Feb 8, 9:16 am, Marnen Laibow-Koser li...@ruby-forum.com wrote: Andrew France wrote: On 09/02/10 01:32, Marnen Laibow-Koser wrote: Andrew France wrote: Hi, I was thinking whether it would be more elegant for a view

[Rails] Re: Testing Java Script in a View

2010-02-09 Thread Rails Learner
Robert K. wrote: Hey, checkout Selenium (http://seleniumhq.org/). You can use that with webrat and/or cucumber to test javascript within your browser. Robert Hi Robert, Thanks for your reply. I have heard of it and will definitely give it a shot. Thanks a lot!! -- Posted via

[Rails] Re: Controller methods over instance variables?

2010-02-09 Thread Marnen Laibow-Koser
Andrew France wrote: On Feb 10, 12:09�am, Adam Stegman adam.steg...@gmail.com wrote: The trouble with this is that controller methods are actions, not controller code. �Anything else belongs in a model or a helper. I completely agree with Marnen. Fat models, skinny controllers. Your

[Rails] Re: reCAPTCHA headache

2010-02-09 Thread Marnen Laibow-Koser
Kyle wrote: Upon closer inspection, it was discovered that reCAPTCHA information was not being submitted with the form. Form elements were aligned in a table (I know, I know...but it usually works so well...). And now the lecture: don't use tables for alignment under any circumstances.

Re: [Rails] Re: some success at last, and some questions

2010-02-09 Thread Rick DeNatale
On Tue, Feb 9, 2010 at 4:31 AM, Bigos ruby.obj...@googlemail.com wrote: On Feb 9, 9:24 am, Frederick Cheung frederick.che...@gmail.com wrote: On Feb 9, 9:20 am, Bigos ruby.obj...@googlemail.com wrote: So here are my questions: 1 Is it appropriate to put such code here? No. You don't

[Rails] Re: Object Version Control, or at least edit log

2010-02-09 Thread PsiPro
That looks like what I was planning on doing, but a little light on the changed details. Unless anyone has any other suggestion I'll just have to write my own. Brian On Feb 8, 11:37 pm, Erol Fornoles erol.forno...@gmail.com wrote: On Feb 9, 11:48 am, PsiPro arjes...@gmail.com wrote: Hello

[Rails] Password Requests?

2010-02-09 Thread RubyonRails_newbie
When I amended my registration page, I included the digest to encrypt the password in the database. If someone forgets their password, how do I get this mailed back to the user? The action is as follows: def remind @title = Remind Me! if param_posted?(:user) email =

[Rails] Eager Loading

2010-02-09 Thread TomRossi7
Is there a way to specify within a model that an association should always be loaded. For example, the classic example from the API docs: Post.find(:all, :include = :author) What if I ALWAYS wanted the author to be loaded whenever a Post object was created? So, in essence, Post.find(:all)

Re: [Rails] Eager Loading

2010-02-09 Thread Mat Brown
You can set up a default scope: http://ryandaigle.com/articles/2008/11/18/what-s-new-in-edge-rails-default-scoping Mat On Tue, Feb 9, 2010 at 09:59, TomRossi7 t...@themolehill.com wrote: Is there a way to specify within a model that an association should always be loaded.  For example, the

Re: [Rails] Password Requests?

2010-02-09 Thread Curtis Cooley
If you are using a one way hash, like 'digest/sha1', then you will not be able to decrypt the password. You can only reset it to something the system knows then send that password to them. On Tue, Feb 9, 2010 at 6:54 AM, RubyonRails_newbie craigwest...@googlemail.com wrote: When I amended my

[Rails] Re: Password Requests?

2010-02-09 Thread RubyonRails_newbie
how would I go about resetting the password for the user to then go ahead and change to something more memorable? Is there a tutorial about this, or can you explain how this is achieved? Kind Regards On 9 Feb, 15:06, Curtis Cooley curtis.coo...@gmail.com wrote: If you are using a one way hash,

[Rails] Re: Object Version Control, or at least edit log

2010-02-09 Thread Marnen Laibow-Koser
PsiPro wrote: That looks like what I was planning on doing, but a little light on the changed details. What are you referring to? Please quote when replying; we can't read your mind. :) Unless anyone has any other suggestion I'll just have to write my own. There are others -- for

[Rails] Re: Password Requests?

2010-02-09 Thread Marnen Laibow-Koser
Craig Westmoreland wrote: how would I go about resetting the password for the user to then go ahead and change to something more memorable? Is there a tutorial about this, or can you explain how this is achieved? If you're using Authlogic, this is trivial and explained in the docs IIRC.

Re: [Rails] Re: Password Requests?

2010-02-09 Thread Curtis Cooley
On Tue, Feb 9, 2010 at 7:14 AM, RubyonRails_newbie craigwest...@googlemail.com wrote: how would I go about resetting the password for the user to then go ahead and change to something more memorable? Is there a tutorial about this, or can you explain how this is achieved? Not sure if there

[Rails] Re: Double render/redirect philosophy

2010-02-09 Thread Matt Jones
On Feb 8, 2:04 pm, Ralph Shnelvar li...@ruby-forum.com wrote: Ok, I think I understand why RoR will flag an attempt double render in an action. What I don't understand is the philosophy of render and redirect_to. Specifically, why isn't a return implicit in both those methods? Unless I've

[Rails] text_field_with_auto_complete without a model

2010-02-09 Thread dino d.
hi- is this possible? basically, i have a simple search text box whose contents i want to send to my server to suggest a query. that suggested query will be in turn retrieved from a 3rd party API. I cannot figure out for the life of me how to use text_field_with_auto_complete without a model.

[Rails] Re: checking for nil

2010-02-09 Thread Matt Jones
On Feb 8, 2:52 pm, Rob Biedenharn r...@agileconsultingllc.com wrote: (but I agree that you should get the logic out of the view if   possible.  Perhaps in a helper? He should get the logic out of the app *entirely*. This is the exact use case for IE's conditional comments:

[Rails] Re: Object Version Control, or at least edit log

2010-02-09 Thread Matt Jones
You may want to take a look at vestal_versions: http://github.com/laserlemon/vestal_versions Haven't used it myself, but looks to be able to revert objects to pretty much any previous version *and* show what changed between arbitrary pairs of versions. --Matt Jones On Feb 9, 9:47 am, PsiPro

[Rails] Re: Object Version Control, or at least edit log

2010-02-09 Thread Marnen Laibow-Koser
Matt Jones wrote: You may want to take a look at vestal_versions: http://github.com/laserlemon/vestal_versions Haven't used it myself, but looks to be able to revert objects to pretty much any previous version *and* show what changed between arbitrary pairs of versions. --Matt Jones

[Rails] Re: UJS in Rails 3 Beta

2010-02-09 Thread overture
Useful link I found:- http://joshhuckabee.com/jquery-rails-3 On Feb 8, 9:56 am, overture phil.mccl...@gmail.com wrote: Hi All, Does anyone know if there are any good examples of how to use the unobtrusive javascript functionality in Rails 3.  I've read the release notes but I can't seem to

Re: [Rails] Re: UJS in Rails 3 Beta

2010-02-09 Thread Greg Donald
On Tue, Feb 9, 2010 at 10:35 AM, overture phil.mccl...@gmail.com wrote: Useful link I found:- http://joshhuckabee.com/jquery-rails-3 Does the HTML5 stuff in Rails3 degrade to something else for browsers that don't support it yet? I've read all the Rails3 news I can find but don't see this

Re: [Rails] Re: UJS in Rails 3 Beta

2010-02-09 Thread Steve Klabnik
I don't think that Rails 3 is using anything that wouldn't already be supported by older browsers. It's not like it's sticking in canvas by default, just using some special named parameters. A large goal with HTML5 was backward compatibility. -- You received this message because you are

[Rails] Store multiple check_box of same attribute in Search class

2010-02-09 Thread Vincent P
How do I store the value of multiple checkboxes as a result of using check_box helper in a Search class? A Search class is explained here: http://railscasts.com/episodes/111-advanced-search-form. For example, a user should be able to search for all Gay OR Bisexual users by clicking both

Re: [Rails] Rails3 pre and protect_from_forgery

2010-02-09 Thread Jeremy Kemper
Hey Bryan, please do report a bug on Lighthouse. Let's get that fixed up for the next beta. Thanks! jeremy On Mon, Feb 8, 2010 at 7:24 PM, bshelton229 br...@sheltonopensolutions.com wrote: I've almost entirely converted a rails 2.3.5 app to 3pre. I'm having some trouble with

[Rails] Re: radio_button_tag for every value of constant array

2010-02-09 Thread Vincent P
Hi Marnen, Thank you so much for pointing me to using a Search class. I watched the screencast on this http://media.railscasts.com/videos/111_advanced_search_form.mov and realized this is what I should do so that the app can remember a user's search. My question now is How do I store the value

[Rails] Re: Object Version Control, or at least edit log

2010-02-09 Thread PsiPro
You may want to take a look at vestal_versions: http://github.com/laserlemon/vestal_versions Haven't used it myself, but looks to be able to revert objects to pretty much any previous version *and* show what changed between arbitrary pairs of versions. --Matt Jones I have to agree, that

[Rails] Re: Weird behavior on Ruby 1.9.1

2010-02-09 Thread rodrigo3n
Thanks :-) -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. For more

[Rails] Re: How to use ruby script/console to debug methods in appl

2010-02-09 Thread lukas
Marnen, thanks for your feedback. Indeed, I'm a newbie ruby programer. I'll keep your advice in mind. I was just hoping I could run the method from the debugging console and check the output directly. On Feb 8, 11:23 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: lukas wrote: Hello

[Rails] Re: ym4r/GM GLatLng and RJS

2010-02-09 Thread Charlie Mezak
shaper wrote: shaper wrote: And using Firebug to look at the javascript that's returned, I get this: map.setCenter(#Ym4r::GmPlugin::GLatLng:0xb7530778,12); which makes it pretty clear that the GLatLng object is having to_s called on it rather than the ym4r's

[Rails] Re: How to use ruby script/console to debug methods in appl

2010-02-09 Thread Jeff Lewis
Hi Lukas, You definitely can, by adding some temporary debug puts calls interspersed in your method, and then calling your method either using ./script/runner or from within a ./script/console session. To make that method easier to test, I'd relocate that method outside of

[Rails] Re: How to use ruby script/console to debug methods in appl

2010-02-09 Thread Marnen Laibow-Koser
lukas wrote: Marnen, thanks for your feedback. Indeed, I'm a newbie ruby programer. I'll keep your advice in mind. OK. You're most welcome. I was just hoping I could run the method from the debugging console and check the output directly. You can. And I explained how. script/console

[Rails] Inserting Javascript dinamically with DOM

2010-02-09 Thread Yuri Albuquerque
I want to do simple stuff. In my controller I have this: render :update do |page| page.replace_html 'scripts', :partial = 'scripts', :locals = {:question = @question} end And in the partial I have this: % if question.sound % Sound loaded! script

[Rails] Re: Inserting Javascript dinamically with DOM

2010-02-09 Thread Marnen Laibow-Koser
Yuri Albuquerque wrote: I want to do simple stuff. In my controller I have this: render :update do |page| page.replace_html 'scripts', :partial = 'scripts', :locals = {:question = @question} end And in the partial I have this: % if question.sound % Sound loaded! script

[Rails] .find() with contents of Array

2010-02-09 Thread John Mcleod
Hello all, I'm on my 4th month with Ruby on Rails. I'm doing good, I think, but have a long way to go. I have an array with several IDs. Array [1,4,6,10,40] I wish to perform a find() on a Model, on each of these IDs, then be able to send the results to a view. Thank you for any help on this.

[Rails] Re: text_field_with_auto_complete without a model

2010-02-09 Thread dino d.
I found the answer- you put a text_field_tag in first and then the autocomplete div, and then auto_complete_field %= auto_complete_field text_box_id, :url = {:action = 'auto_complete'}, :method = GET % (the method part fixes the invalid token problem) hope this helps someone down the

[Rails] Problem with before_* callbacks being wrapped in transaction

2010-02-09 Thread iwars...@stripey.net
I am upgrading a 2.1 Rails app and ran into a problem with the new way that before_* callbacks are being wrapped in a transaction. I have a model that has a before_create callback which charges the customers credit card. If the transaction is successful it returns true, and if not, false so that

[Rails] Re: .find() with contents of Array

2010-02-09 Thread John Mcleod
Well, I found out that I just do this... m = Array Model.find(m) That gives me my results. Thanks, John -- 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

[Rails] auto_complete always selects the first item, can i prevent this?

2010-02-09 Thread dino d.
if you use google or yahoo's search autocomplete, you'll see that they do not select the first item automatically. this way, if you don't choose an item, and hit return, the return submits the form. is there a way to make this work with auto_complete? in other words, i'd like it to behave like

[Rails] Re: Problem with before_* callbacks being wrapped in transac

2010-02-09 Thread Marnen Laibow-Koser
iwars...@stripey.net wrote: I am upgrading a 2.1 Rails app and ran into a problem with the new way that before_* callbacks are being wrapped in a transaction. I have a model that has a before_create callback which charges the customers credit card. If the transaction is successful it returns

[Rails] updating attributes of another model

2010-02-09 Thread John Merlino
I hve a relationship like this in my model: Student has_one :student_fail StudentFail belongs_to :student_fail_state belongs_to :student StudentFailState has_many :students, :through = :student_fail has_many :student_fails In terms of the controller, what would be the best way to update

[Rails] Re: UJS in Rails 3 Beta

2010-02-09 Thread overture
Maybe there will be some good examples available soon. Hope so. -- 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

[Rails] Re: auto_complete always selects the first item, can i prevent this?

2010-02-09 Thread dino d.
i did find this solution, but i'm not crazy about it: https://prototype.lighthouseapp.com/projects/8887/tickets/116-ajaxautocompleter-default-selects-first-item On Feb 9, 3:18 pm, dino d. dinodorr...@yahoo.com wrote: if you use google or yahoo's search autocomplete, you'll see that they do

Re: [Rails] updating attributes of another model

2010-02-09 Thread Mat Brown
http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nested-attributes On Tue, Feb 9, 2010 at 15:37, John Merlino li...@ruby-forum.com wrote: I hve a relationship like this in my model: Student  has_one :student_fail StudentFail belongs_to :student_fail_state belongs_to

[Rails] Re: tool for visualizing schema and associations

2010-02-09 Thread wowo08
Hi Jeff, have you tried Railroad? http://railroad.rubyforge.org/ Cheers, Roman On 5 Feb., 20:00, Jeff Pritchard li...@ruby-forum.com wrote: I'm working with other people on a Rails project with a fairly deep set of interconnected data. This is the first time I've tried to discuss data

[Rails] Re: tool for visualizing schema and associations

2010-02-09 Thread wowo08
sorry, I've overseen, that you already got the proposition for railroad. Roman On 9 Feb., 22:14, wowo08 rsladec...@gmx.de wrote: Hi Jeff, have you tried Railroad? http://railroad.rubyforge.org/ Cheers, Roman On 5 Feb., 20:00, Jeff Pritchard li...@ruby-forum.com wrote: I'm working

[Rails] Re: tool for visualizing schema and associations

2010-02-09 Thread wowo08
sorry, I've overseen, that you already got the proposition for railroad. Roman On 5 Feb., 20:00, Jeff Pritchard li...@ruby-forum.com wrote: I'm working with other people on a Rails project with a fairly deep set of interconnected data. This is the first time I've tried to discuss data

[Rails] Re: Action Web Service : Missing template ... wsdl.rhtml

2010-02-09 Thread Lucas Hills
In case anyone else comes across this again, I had a similar problem when trying to create a wsdl and my browser telling me a template was missing. If you add the following to config/environments.rb module SOAP SOAPNamespaceTag = 'env' XSDNamespaceTag = 'xsd' XSINamespaceTag = 'xsi' end

[Rails] Re: Can not generate WSDL

2010-02-09 Thread Lucas Hills
In case anyone else comes across this again, I had a similar problem when trying to create a wsdl and my browser telling me a template was missing. If you add the following to config/environments.rb module SOAP SOAPNamespaceTag = 'env' XSDNamespaceTag = 'xsd' XSINamespaceTag = 'xsi' end

[Rails] Amending partials

2010-02-09 Thread Sam
Hi there I'm new to ruby on rails and I need some help with amending a view i created using partials. I need to create a booking form that allows me to enter a business name, address and category and i created three different views, tables etc using scaffolding (I did this as I needed separate

[Rails] Quality Officer

2010-02-09 Thread irenka
Cubiware jest spółka zajmująca się tworzeniem oprogramowania dla urządzeń interaktywnej telewizji cyfrowej oraz internetowej. Firma współpracuje z klientami i partnerami zagranicznymi, a nasze oprogramowanie jest używane w USA, krajach Europy Zachodniej oraz w Azji. Naszymi Klientami są producenci

[Rails] Re: Error running Mongrel on Ruby 1.9

2010-02-09 Thread Alessandro Queiroz
Hi all, I have the same problem here... Did you found any solution? ty On 30 dez 2009, 18:34, Ahmed Abdelsalam li...@ruby-forum.com wrote: Hi, I have a problem running Mongrel, I'm using the latest ruby 1.9 and rails 2.3.5 when I start the server (I'm using Aptana IDE), on mongrel, here

[Rails] How to do password expire after 15 days?

2010-02-09 Thread Maycon Felici
Hello, I need to create a application wich registereds users have yours passwords expired after 15 days in order that I can generate a new password and send them by email. Tanks, Sorry, my english no good. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Problem with before_* callbacks being wrapped in transaction

2010-02-09 Thread Frederick Cheung
On Feb 9, 8:14 pm, iwars...@stripey.net iwars...@gmail.com wrote: I am upgrading a 2.1 Rails app and ran into a problem with the new way that before_* callbacks are being wrapped in a transaction. I have a model that has a before_create callback which charges the customers credit card. If

Re: [Rails] Re: Error running Mongrel on Ruby 1.9

2010-02-09 Thread Mat Brown
Not sure what's causing the problem, but I think thin and passenger are pretty widely preferred over mongrel these days -- might want to give one of those a shot. On Tue, Feb 9, 2010 at 16:29, Alessandro Queiroz alessandro...@gmail.com wrote: Hi all, I have the same problem here... Did you

[Rails] show/hide some few fields according to a value selected

2010-02-09 Thread Amrani Salma
Hola a todos, Soy nueva en rails. Lo que quiero es dentro de un form_for segun lo que se seleciona de una lista se muestra una parte del formulario o otra. He esta buscando y rebuscando y he entendido que se puede hacer usando un observe_field que llame a una plantilla rjs y replace_html para

[Rails] undefined method `generate_token'

2010-02-09 Thread RubyonRails_newbie
Hi Everyone... I'm following a railscast episode on how to implement an invitation feature. It's going really well, but i've hit a minor snag that I cant get over.. undefined method `generate_token' for #Invitation:0x2563bf8 The invite form allows me to check for a user, and whether they

[Rails] Re: no route found to match - Routing Error on Dreamhost

2010-02-09 Thread Deepak Dakshinadi
I could solve the issue by restarting my Webrick server. -- 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...@googlegroups.com. To unsubscribe

[Rails] Re: How to use ruby script/console to debug methods in appl

2010-02-09 Thread lukas
Thanks Jeff, it worked. We've been able to test the whole stack of methods. :) And I've learned something today. Regards Lukas On Feb 9, 8:44 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: lukas wrote: Marnen, thanks for your feedback. Indeed, I'm a newbie ruby programer. I'll

[Rails] Proper Installation on Debian?

2010-02-09 Thread Greg Chambers
So I have been trying to follow the instructions on http://www.debian-administration.org/articles/329 to get rails to be running properly on my Debian machine, but I have been running into several issues. The first one just being the version of RubyGems in the Debian repos doesn't seem to work

[Rails] validation problems

2010-02-09 Thread Ichiro Saga
Hi, there. I have two validations in the model: validates_numericality_of :value, :only_integer=true, :allow_blank=true validates_size_of :value, :is=9, :message=must be 5-digit number, :if=Proc.new{|u| u.value.is_a?(Numeric)} They work as expected except when the :value is character/string like

[Rails] DB query cache

2010-02-09 Thread Tristan
Hi all I've got a problem that's been bugging me for a while now. We have a page of news article summaries with links to the full article (pretty standard sort of thing). When we create new articles in production they appear in the admin index but they don't show on the public index for some

[Rails] Re: What happened to CoC?

2010-02-09 Thread tuti plain
I have a version of the book with something that looks like a circular stamp on the cover that says Covers Rails 2.0, so I guess it has been updated. ;) And I would have to agree with Marnen. It looks like you have a routing issue. Cheers. Mine has it, too. The author clarifies in

[Rails] Re: validation problems

2010-02-09 Thread E. Litwin
validates_numericality_of :value, :only_integer=true, :allow_blank=true validates_size_of :value, :is=9, :message=must be 5-digit number, :if=Proc.new{|u| u.value.is_a?(Numeric)} Try it as u.is_a?(Numeric) -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: validation problems

2010-02-09 Thread Ichiro Saga
E. Litwin wrote: validates_numericality_of :value, :only_integer=true, :allow_blank=true validates_size_of :value, :is=9, :message=must be 5-digit number, :if=Proc.new{|u| u.value.is_a?(Numeric)} Try it as u.is_a?(Numeric) Thanks Litwin. I tried that before but it made the second

[Rails] accepts_nested_attributes_for abilities

2010-02-09 Thread John Merlino
Is there a way to use accepts_nested_attributes_for to update another table from within a controller. For example, I have this in my students controller: def student_fail @student = Subject.find(params[:id]) if params[:id] @student.build_student_fail end def student_fail_finalize if

[Rails] Re: accepts_nested_attributes_for abilities

2010-02-09 Thread Marnen Laibow-Koser
John Merlino wrote: Is there a way to use accepts_nested_attributes_for to update another table from within a controller. For example, I have this in my students controller: def student_fail @student = Subject.find(params[:id]) if params[:id] @student.build_student_fail end def

[Rails] Re: no route found to match - Routing Error on Dreamhost

2010-02-09 Thread Marnen Laibow-Koser
DC wrote: I created that controller as MyTest (following instructions from onlamp, which uses the address MyTest in its example)...did something change in recent versions of Rails where the address of a controller is meant to be in lowercase? Apparently so. Current practice is that

[Rails] remember_me_for in authlogic

2010-02-09 Thread Tom Mac
Hi I am new to using authlogic . My requirement is in Login page I have a check box which says Keep me logged in for 2 weeks . But I dont know how to implement this. I have just seen remember_me_for in the doc. But did not understand how to use it. Could anyone please give an example to use

[Rails] Re: undefined method `generate_token'

2010-02-09 Thread David
You should specify where @user is defined, otherwise it looks like an undefined variable issue. You haven't defined @user in the code you pasted. Most authentication schemes define the current logged in user as current_user or User.current. Are you defining it as @user? On Feb 9, 6:05 pm,

[Rails] How to get Website Templates for a Ruby on Rails

2010-02-09 Thread Ashish Deepak4
Hi Guys, I am a ruby programmer and want to have a crack on building a online store website (eg.tshirt, pants, etc) using ruby on rails as it will be a known territory for me rather than learning php, etc. Anyways, I found heaps of gem like spree which will help me accomplish what I want to do on

[Rails] Re: railslist.com - an opensource craigslist!

2010-02-09 Thread Rails List
Rails Girl wrote: Hi, Is this RailsList now available on GitHub...? Pl. provide a direct link for GitHub... What are the next features that would be added up to this RailsList...? Thx Yep - http://github.com/railslist/craigslist-clone let me know if there any issues downloading it.

  1   2   >