[Rails] Re: Dynamic select box

2009-02-18 Thread pepe
in the view. Your view will be much easier to read and modify. My guess is that the problem you have is that you don't have a current_user type value (or not the one you believe you have) by the time your code runs. Pepe On Feb 17, 5:52 pm, Guillaume Loader rails-mailing-l...@andreas- s.net wrote

[Rails] Re: como consultar en oracle

2009-02-17 Thread pepe
vista, a no ser que la tabla no tenga datos o no tenga datos que cumplan las condiciones requeridas para ser mostrado por la vista. Sé que esto probablemente no te ayuda nada o casi nada pero con la descripción del problema que diste es lo mejor que puedo ofrecer. Pepe On Feb 16, 4:51 pm, Oraldo

[Rails] Re: Logging all exceptions

2009-02-13 Thread pepe
Maybe you could use callbacks? On Feb 12, 10:53 am, koopmann.lenn...@googlemail.com koopmann.lenn...@googlemail.com wrote: Hey everyody, what is the best way to log _all_ exceptions that are thrown in my Rails application into a database table? I need some kind of hook in the Rails

[Rails] Re: sparse tables seems to be an impossible term to search on google

2009-02-10 Thread pepe
I am not an expert by any means on this, I am just trying to offer a suggestion, but have you thought about storing the data as XML? If you do it right you should be able to extract the information you need very easily. Pepe On Feb 10, 10:35 am, frankjmat...@gmail.com frankjmat...@gmail.com

[Rails] Re: Versionning system

2009-01-11 Thread pepe
Thank you very much to all of you for your help. I really appreciate it. :) Pepe On Jan 9, 2:42 am, Bosko Ivanisevic bosko.ivanise...@gmail.com wrote: I rarely use GUI tools that come with git. Although gitk is really excellent if you want to examine history, especially since feature to use

[Rails] Re: Versionning system

2009-01-08 Thread pepe
available in both areas, which one should I go with? Thanks a lot again. Pepe On Jan 8, 10:42 am, Fernando Perez rails-mailing-l...@andreas-s.net wrote: pepe wrote: Hi all. I want to apologize, I guess this is not the best place to post this but I'm interested to know what RoR developers

[Rails] Versionning system

2009-01-07 Thread pepe
Hi all. I want to apologize, I guess this is not the best place to post this but I'm interested to know what RoR developers think. What would be a good open source versionning system for somebody that has never used one? Thanks a lot. Pepe

[Rails] Re: How to render more than one partial?

2009-01-04 Thread pepe
as a method call and you'll understand what you'll get out of it. Pepe On Jan 4, 7:52 am, Zhao Yi rails-mailing-l...@andreas-s.net wrote: pepe wrote: Another sample based on the original listed above. You cold leave in your page: tr   %= :render :partial = 'your_A_and_B_partial' % /tr tr

[Rails] Re: Rendering partials from outside of Rails

2009-01-03 Thread pepe
should be able to use one of the 2 first samples and modify it for your needs. Pepe On Jan 2, 1:39 pm, Jeff jeffpatter...@gmail.com wrote: I'm using render :file, but as far as I can tell, Rails still tacks RAILS_ROOT/app/views to the beginning of the given filename. Is there a way to disable

[Rails] Re: How to render more than one partial?

2009-01-01 Thread pepe
Hello. I don't see anything wrong with this code. Do you want to do something different than this? I guess I am not understanding the problem? On Dec 31 2008, 6:07 am, Zhao Yi rails-mailing-l...@andreas-s.net wrote: Ryan Bigg wrote: Render the other partial inside that partial. -

[Rails] Re: Preventing a form from submitting on ENTER

2008-12-30 Thread pepe
it tonight when I get home. Pepe On Dec 30, 5:16 am, Mukund marut...@yahoo.com wrote: Create a form without a submit tag.   Put in another control on the web page that does $('id_of_my_form').submit(); using a javascript onclick event or whatever. Regards, Mukund sa 125 wrote: Hi - I

[Rails] Re: Plugin auto_complete

2008-12-25 Thread pepe
I'm having the same problem as Sylv. Where to find git? On Dec 25, 12:57 pm, Matt Thompson ma...@defunct.ca wrote: Sylv Mosfet wrote: Hi all ! I began to develop Rails applications with Aptana Radrails under Windows. For that I had successfully installed auto_complete plugin and

[Rails] Switching to active_record_store session management errors out

2008-12-24 Thread pepe
is in the table name change I made (from singular to plural). I have looked to see if there was a way in Rails to override the name of the table that stores session information but couldn't find any. I really would appreciate some help on this. Thanks in advance. Pepe

[Rails] Re: Calendar icon for date selection functionality

2008-12-23 Thread pepe
Thanks a lot, guys. :) Pepe On Dec 21, 11:19 pm, Ram yourstruly.vi...@gmail.com wrote: this is the plugin u need code.google.com/p/calendardateselect/ On Dec 21, 12:24 am, Eric ericgh...@gmail.com wrote: calendar_date_select On Dec 20, 10:33 am, pepe p...@betterrpg.com wrote: Hello

[Rails] Re: dynamic drop down list submission problem

2008-12-23 Thread pepe
containing the input field definition, that way the input field gets 'written' to the page and uses the value of @to_be_updated to initialize its contents. Please let me know if you need anything else. Pepe On Dec 20, 2:23 pm, Pra Ng rails-mailing-l...@andreas-s.net wrote: Pra Ng wrote: pepe

[Rails] Re: how to use set_primary_key?

2008-12-23 Thread pepe
I think I read somewhere that when creating a new record you still have to reference the field as 'id' (id=value) or it will not work. It's worth the try. Pepe On Dec 22, 5:33 pm, Kenneth McDonald kenneth.m.mcdon...@sbcglobal.net wrote: I think the problem is likely that the old primary key

[Rails] Re: dynamic drop down list submission problem

2008-12-22 Thread pepe
Hi Pra, Sorry, I have been (still am) busy. I'll try to give you an example ASAP but it might take me a little while. Hopefully soon. Pepe On Dec 20, 2:23 pm, Pra Ng rails-mailing-l...@andreas-s.net wrote: Pra Ng wrote: pepe wrote: I believe you are missing an input field for your updated

[Rails] Re: Alternative solution to session and global variables

2008-12-18 Thread pepe
a working application designed around that principle, which is actually identical to what the person in the first posting described. If my assumption about session data is not correct I need to know in order to re-engineer my app. ASAP. So please, set me straight if I'm wrong. Thank you. Pepe

[Rails] Re: dynamic drop down list submission problem

2008-12-18 Thread pepe
... % Pepe On Dec 18, 8:22 am, Pra Ng rails-mailing-l...@andreas-s.net wrote: hi all,, i got a little problem here. with my code below, what i am trying to do is to select the value from drop down list, and then updating the value of the text field. However, after updating the value of the text

[Rails] Re: Alternative solution to session and global variables

2008-12-17 Thread pepe
I'm sorry but don't really understand. Are you saying that the users share the session information? How is that possible? I thought the session information is unique per user. Pepe On Dec 16, 11:41 am, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Tue, Dec 16, 2008 at 7:51 AM

[Rails] Re: More than one submit_tag in a single form

2008-12-17 Thread pepe
Please, correct me if I am wrong, but couldn't you just assign a value to each submit button that means what you need in your application (and ID value, for example) then check the value from the params hash? Pepe On Dec 16, 2:18 pm, Frederick Cheung frederick.che...@gmail.com wrote: On Dec 16

[Rails] Re: Where do I start?

2008-12-11 Thread pepe
used and how things work. This is true even if you have a decent understanding about Ruby (I raise my hand there). However, if you learn Ruby (and practice it before starting writing code for/with Rails) you'll be in a much better position when you start using Rails. Pepe On Dec 11, 6:51 pm, Ryan

[Rails] Re: Ruby Arrays - Passing arrays from a function possible?

2008-12-11 Thread pepe
You can check this for a quick reference: http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_methods.html Pepe On Dec 11, 5:14 pm, Bob Sanders rails-mailing-l...@andreas-s.net wrote: Ryan Bigg wrote: Or I think you can do *args for the receivIng method and then call it like method

[Rails] Re: subclassing vs mixins, which one should be used?

2008-12-10 Thread pepe
/simplest solution. Pepe On Dec 10, 1:09 pm, Philip Hallstrom [EMAIL PROTECTED] wrote: On Dec 10, 3:02 am, Philip Hallstrom [EMAIL PROTECTED] wrote: I don't know anything about your app, but if you don't use STI (ie. you leave abstract_class = true) you'll never be able to tell the difference b

[Rails] Re: Opinion on Multiple forms on same page

2008-12-09 Thread pepe
one and the same or are they run by the same form? I hardly think so. Pepe On Dec 8, 11:17 am, Hassan Schroeder [EMAIL PROTECTED] wrote: On Mon, Dec 8, 2008 at 4:07 AM, Chirantan [EMAIL PROTECTED] wrote: I have heard few people saying that one must avoid using multiple forms on the same page

[Rails] Re: Printing with rails

2008-12-07 Thread pepe
Maybe what you could do is to generate the data to be printed in a document that the user could download, then you send a page with a button to download it as a file that then they could print, but I guess this defeats the purpose of 'automating' the printing of the data. Pepe On Dec 6, 5:25 pm

[Rails] Re: one controller+5 forms(stages)

2008-12-05 Thread pepe
, and so on) as of what needed to happen when and the correct page was always displayed. I'm not sure if this is the best way of going but it worked best for me. Pepe On Dec 5, 1:04 am, balaji rajagopal [EMAIL PROTECTED] wrote: Hi Im using one controller+ 5 forms(5 stages). and i used the code

[Rails] Re: Checking if an association already exists between two records

2008-12-02 Thread pepe
I guess you have your reasons but why not ignore the fact that the relationship already existed? Does it really matter to let the user know? Pepe On Dec 1, 12:29 pm, Brandon Keepers [EMAIL PROTECTED] wrote: On Mon, Dec 1, 2008 at 11:07 AM, Gearóid O'Ceallaigh [EMAIL PROTECTED] wrote: Hey

[Rails] Re: Database password encryption

2008-11-30 Thread pepe
was told by a security expert that over 90% of hack attacks are insider jobs. I'll pass along a link to this discussion to the person in charge. I hope they realize that the password encryption is not the solution to the problems they're trying to prevent. Many thanks to all of you. Pepe On Nov

[Rails] Re: Populate a popup menu based on another menu selection

2008-11-30 Thread pepe
Have you heard of observe_field? Pepe On Nov 28, 10:28 am, Paul Finer [EMAIL PROTECTED] wrote: Can anyone help me this? -- Posted viahttp://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] how to redirect_to the index.html page

2008-11-29 Thread Pepe Sanchez
hi all If I add in my code redirect_to :action = 'index' it redicrects to the index method in the current controller. how can I redirect it to the index.html page ? thanks -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Database password encryption

2008-11-26 Thread pepe
Hello. I currently have an application deployed and running and just recently I have been asked to encrypt the database password. The password is in the database.yml file. What would be the easiest way of making this work? Thank you. Pepe

[Rails] Re: Database password encryption

2008-11-26 Thread pepe
had already ran into this and had a better solution. Thanks for your suggestion, though. Pepe On Nov 26, 5:28 pm, Brian Hogan [EMAIL PROTECTED] wrote: If they're asking you to encrypt thepasswordin thedatabase.yml file itself, you kinda can't.  I think the best you can do is secure the flle's

[Rails] Re: Does not validate presence of entry fields

2008-10-14 Thread Pepe Sanchez
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@googlegroups.com To unsubscribe

[Rails] How to go back to the Home page

2008-10-11 Thread Pepe Sanchez
Hi all My home page is called index.hml and it is located under the Public folder. When I am creating a new record in a controller I type: - http://mysite/mycontroler/new when this page opens if I click in the menu Home, it redirects me to - http://mysite/mycontroler/new instead of

[Rails] Re: How to go back to the Home page

2008-10-11 Thread Pepe Sanchez
I need to link_to my home page index.html located inside the public folder -- 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

[Rails] http://localhost:3000/index.html does not open my home page

2008-10-11 Thread Pepe Sanchez
Hi all How can I change the setup in order to open my home page index.html located inside the Public folder when I type http://localhost:3000/index.html thanks -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because

[Rails] ho to convert submit button html code to RoR

2008-10-10 Thread Pepe Sanchez
Hi all this is my html code: input type=submit value=Submit class=submit / I want to convert it to RoR %= submit_tag 'Submit' % Where do I add the class=submit in RoR? thanks -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received

[Rails] form_for yags questions

2008-10-10 Thread Pepe Sanchez
Hi have a question about several tags, I do not understand if they are RoR tags os something else this is my form, I wrote it following the book Simply Rails 2 in chapter 6: % form_for @contacto do |f| % plabelYour Name:br /%= f.text_field :name, :size = 25 %/label/p plabelYour email:br / %=

[Rails] Tableless models in Rails

2008-10-09 Thread Pepe Sanchez
Hi all I am looking for some informaiton about how to create forms using tableless models. What do you recommend? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Tableless models in Rails

2008-10-09 Thread Pepe Sanchez
I mean a data entry form that is not connected to a table through a model -- 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,

[Rails] Where do I add my class in RoR

2008-10-07 Thread Pepe Sanchez
If I want to add my class where do I add it? as a module or as a controller? class Contact def initialize(name, email, message) @name = name @email= email @message= message end def name(name) @name = name end def email(email) @email= email end def

[Rails] Re: Where do I add my class in RoR

2008-10-07 Thread Pepe Sanchez
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@googlegroups.com To unsubscribe from

[Rails] create contact form

2008-10-05 Thread Pepe Sanchez
Hi all I have a regular HTML form that I want to convert into a RoR form Because I do not need to save the data in the database I think I need: - a controller and a viewer - send submitted fields through email h2Contact Form/h2 form action=contact.html fieldset legendPlease send

[Rails] Re: Re: Contact page

2008-10-05 Thread Pepe Sanchez
Is there a way to create a contact form that sends an email without having a table related to it. In my case I do not need a table contacts, I only need to send an email. thanks h2Contact Form/h2 form action=contact.html fieldset legendPlease send your message: /legend

[Rails] Re: Finding distinct months using find_by_sql

2008-09-24 Thread pepe
would be in Postgresql. Something like this: case when DATE_PART('month', date) = 1 then 'January' when DATE_PART('month', date) = 2 then 'February' . end Pepe On Sep 23, 3:45 pm, it [EMAIL PROTECTED] wrote: Thanks for the reply Johannes.  I think you're right about

[Rails] Re: Problem with set_table_name and custom method in model

2008-09-18 Thread pepe
Just a guess but maybe it will work if instead of self. you use Vehicle. when defining the method: Vehicule.get_vehicule(...) Pepe On Sep 17, 8:34 am, Rémi Gagnon [EMAIL PROTECTED] wrote: Christian Rishøj wrote: I recall having a similar problem. I believe I got around it by overriding

[Rails] Re: how to validate against a field that is not in the model?

2008-09-17 Thread pepe
Why don't you pass the session value as a parameter to a model's method? In your controller you would have something like: model.exceeded_vote_count?(session[:vote_count]) In your model: def Model.exceeded_vote_count?(count) count MAX_VOTE_COUNT ? true : false end Pepe On Sep 17, 2:28 am

[Rails] Re: how to validate against a field that is not in the model?

2008-09-17 Thread pepe
Sorry, I should have written: exceeded_count = Model.exceeded_vote_count?(session[:vote_count]) On Sep 17, 12:32 pm, pepe [EMAIL PROTECTED] wrote: Why don't you pass the session value as a parameter to a model's method? In your controller you would have something like

[Rails] image_tag for images outside of application

2008-09-13 Thread pepe
Hello. I'm writing an application that uses images stored in the same server but outside of the application directory. I have tried many things but nothing worked and found nothing really useful anywhere. What can I do so the image_tag helper finds the images I need? Thanks a lot. Pepe

[Rails] Re: Common models code - where to put it?

2008-09-11 Thread pepe
Thanks to all. :) Pepe On Sep 11, 9:16 am, Ryan Bigg [EMAIL PROTECTED] wrote: You could define the model like this, as a file called lib/ shared_methods.rb module SharedMethods    def to_s      name    end end and then just type include SharedMethods in any model you want to have

<    1   2   3   4   5