[Rails] Re: Auto populate text_fields based on selected item from another collection_select

2011-11-11 Thread Xuan
I would do it as follows: + Set a jquery event on your select in some .js file: $(#your_select_id).on(change, function(){ $.ajax({ url, data, etc... checj jquery docs }); }); I suggest .on() assuming you are using jquery 1.7. Alternatively you can check .delegate() or .bind() if you are

[Rails] date problem with the server

2011-11-11 Thread honey ruby
hi every one i have problem with the date with the server. i am from india . when i use Date.today before 12 in the morning hours IST . it is showing yesterday date in my website and after 12 it is fine it shows today's date. i am using wit UTC . now i cant go wit Time.Zone. i have to change lot

Re: [Rails] date problem with the server

2011-11-11 Thread Colin Law
On 11 November 2011 09:32, honey ruby emailtohoneyr...@gmail.com wrote: hi every one i have problem with the date with the server. i am from india . when i use Date.today  before 12 in the morning hours IST . it is showing yesterday date in my website and after 12 it is fine it shows today's

[Rails] Ruby on Rails/Urgent Requirement

2011-11-11 Thread Jayakar Jangam
Hello, Hope you are doing great. I came across your profile and was interested in speaking to you in regards to an opportunity with one of my clients. I am interested in reviewing your resume and having a conversation to see if we can potentially work together on the positions that I am presently

[Rails] Reset button not working

2011-11-11 Thread yatta20
Hello, I'm new to Ruby. The password reset button no longer works after we rebooted the server. I get a message we're sorry but something went wrong. I'm not sure how to resolve this issue. Here's the code from user_password/new.html.erb div id=existing-customer h1Reset Your Password/h1

[Rails] Videos of Matz's keynote and contest pitches

2011-11-11 Thread Ruzody
Videos of Matz's and Derek Collison keynotes, and Silicon Valley Ruby Innovator Award Competition pitches are now available on the following site. http://www.myfukuoka.com/events/2011-fukuoka-ruby-night And just a quick reminder that Fukuoka Ruby award competition application deadline is coming

[Rails] Newbie learning RoR

2011-11-11 Thread buckmajor
Hey yall OS: Windows7 Browser: Firefox8.0 I am new to RoR and finally got it installed (I think). I used railsInstaller: http://railsinstaller.org/ and downloaded 'vim'. I was unable to install RoR manually the first time since I stumbled across a slight error 'lib' file missing so I used the

[Rails] ActionDispatch SessionRestoreError

2011-11-11 Thread shon
I am in a SessionInfo trouble. error message is ActionDispatch::Session::SessionRestoreError (Session contains objects whose class definition isn't available. Remember to require the classes for all objects kept in the session. (Original exception: uninitialized constant SessionInfo [NameError])

[Rails] Re: Reset button not working

2011-11-11 Thread Frederick Cheung
On Nov 10, 6:33 pm, yatta20 yatt...@hotmail.com wrote: Hello, I'm new to Ruby. The password reset button no longer works after we rebooted the server. I get a message we're sorry but something went wrong. I'm not sure how to resolve this issue. You should start by looking at your

[Rails] Re: Newbie learning RoR

2011-11-11 Thread Frederick Cheung
On Nov 11, 2:25 am, buckmajor buck.ma...@gmail.com wrote: Hey yall OS: Windows7 Browser: Firefox8.0 I am new to RoR and finally got it installed (I think). I used railsInstaller:http://railsinstaller.org/and downloaded 'vim'. I was unable to install RoR manually the first time since I

[Rails] accepts_nested_attributes_for.

2011-11-11 Thread Mauro
Example: accepts_nested_attributes_for :tags, :allow_destroy = :true, :reject_if = proc { |attrs| attrs.all? { |k, v| v.blank? } } :reject_if prevents saving new tags that do not have any attributes filled in. But if in Tag model I use validates contraints it's the same thing? So I can avoid

[Rails] Re: ActionDispatch SessionRestoreError

2011-11-11 Thread Frederick Cheung
On Nov 11, 5:08 am, shon shunji_horik...@fukuoka-csk.co.jp wrote: I am in a SessionInfo trouble. error message is ActionDispatch::Session::SessionRestoreError (Session contains objects whose class definition isn't available. Remember to require the classes for all objects kept in the

Re: [Rails] Newbie learning RoR

2011-11-11 Thread Colin Law
On 11 November 2011 02:25, buckmajor buck.ma...@gmail.com wrote: Hey yall OS: Windows7 Browser: Firefox8.0 I am new to RoR and finally got it installed (I think). I used railsInstaller: http://railsinstaller.org/ and downloaded 'vim'. I was unable to install RoR manually the first time

Re: [Rails] accepts_nested_attributes_for.

2011-11-11 Thread Colin Law
On 11 November 2011 09:50, Mauro mrsan...@gmail.com wrote: Example: accepts_nested_attributes_for :tags, :allow_destroy = :true,   :reject_if = proc { |attrs| attrs.all? { |k, v| v.blank? } } :reject_if  prevents saving new tags that do not have any attributes filled in. But if in Tag

[Rails] belongs_to :model validation with mandatory foreign keys and foreign key at DB layer

2011-11-11 Thread Onur Özgür ÖZKAN
Hi Folks, *First Question* I want to learn that there is a native way make building normal and mandatory belongs_to associations. Let give a simple example, I have two models, first one is Tenant, second is User. User belongs to Tenant which mean there is a User.tenant_id. I can create, save or

[Rails] an advice to manage pdf documents.

2011-11-11 Thread Mauro
I have a model say, Company, that have many document. A Document belongs_to Company. Documents are all pdf files so I have to upload them and I think to save them in the filesystem. How you manage document names? Do you create a folder for every company in which save their documents or rename

Re: [Rails] belongs_to :model validation with mandatory foreign keys and foreign key at DB layer

2011-11-11 Thread Colin Law
2011/11/11 Onur Özgür ÖZKAN onur.ozgur.oz...@lab2023.com: Hi Folks, First Question I want to learn that there is a native way make building normal and mandatory belongs_to associations. Let give a simple example, I have two models, first one is Tenant, second is User. User belongs to Tenant

Re: [Rails] an advice to manage pdf documents.

2011-11-11 Thread Michael Pavling
On 11 November 2011 10:35, Mauro mrsan...@gmail.com wrote: How you manage document names? Do you create a folder for every company in which save their documents or rename documen name to avoid duplicates or to avoid rewrites? I have a polymorphic AttachingType model, which has a FileAttachment

Re: [Rails] an advice to manage pdf documents.

2011-11-11 Thread Mauro
On 11 November 2011 11:56, Michael Pavling pavl...@gmail.com wrote: On 11 November 2011 10:35, Mauro mrsan...@gmail.com wrote: How you manage document names? Do you create a folder for every company in which save their documents or rename documen name to avoid duplicates or to avoid rewrites?

Re: [Rails] an advice to manage pdf documents.

2011-11-11 Thread Michael Pavling
On 11 November 2011 11:00, Mauro mrsan...@gmail.com wrote: Do you use paperclip? erm.. no :-) I use a model of my own. Paperclip is great for bunging in a single file attachment (inline, into your model), but wasn't a very flexible/scalable solution (or at least it wasn't when I needed to do

[Rails] Error on Rails Using Uploadify-S3 ...

2011-11-11 Thread RockStar
Dear all, I would like to share my current bug which really bothers me alot... Recently, i have found this uploadify code on rails along with amazon c3 (https://github.com/blazingcloud/rails-uploadify-s3) Actually, I have setup everything according to this github project tutorial ... But Only

[Rails] Re: belongs_to :model validation with mandatory foreign keys and foreign key at DB layer

2011-11-11 Thread Frederick Cheung
On Nov 11, 10:25 am, Onur Özgür ÖZKAN onur.ozgur.oz...@lab2023.com wrote: Hi Folks, *First Question* I want to learn that there is a native way make building normal and mandatory belongs_to associations. Let give a simple example, I have two models, first one is Tenant, second is User.

Re: [Rails] an advice to manage pdf documents.

2011-11-11 Thread Mauro
On 11 November 2011 12:15, Michael Pavling pavl...@gmail.com wrote: On 11 November 2011 11:00, Mauro mrsan...@gmail.com wrote: Do you use paperclip? erm.. no :-) I use a model of my own. Paperclip is great for bunging in a single file attachment (inline, into your model), but wasn't a very

Re: [Rails] an advice to manage pdf documents.

2011-11-11 Thread Michael Pavling
On 11 November 2011 11:23, Mauro mrsan...@gmail.com wrote: I have Company has_many :documents and Document belongs_to :company Document has various attributes and the pdf file associated. I still don't understand if paperclip is suitable for my needs in this case. That I can't say. Only you

[Rails] time zone not getting saved in the database

2011-11-11 Thread Annapoorna R
Hello, Using rails 2.3.9 and ruby 1.8.7 I am trying add time zone in the site according to user's time zone (selected by the user from the drop down of time zones)Code is done as follows, but time zone is not getting saved in the database. IN Application Controller before_filter :set_time_zone

Re: [Rails] Error on Rails Using Uploadify-S3 ...

2011-11-11 Thread Colin Law
On 11 November 2011 10:50, RockStar pshahna...@colcentric.com wrote: Dear all, I would like to share my current bug which really bothers me alot... Recently, i have found this uploadify code on rails along with amazon c3 (https://github.com/blazingcloud/rails-uploadify-s3) Actually, I have

Re: [Rails] an advice to manage pdf documents.

2011-11-11 Thread Michael Pavling
On 11 November 2011 11:00, Mauro mrsan...@gmail.com wrote: Do you use paperclip? PS The biggest issues I had with paperclip was the unnormalised approach of adding four fields to your model for each file you want to attach, and that it doesn't (didn't?) allow multiple file attachments. I've

Re: [Rails] time zone not getting saved in the database

2011-11-11 Thread Colin Law
On 11 November 2011 11:30, Annapoorna R prapoorn...@gmail.com wrote: Hello,  Using rails 2.3.9 and ruby 1.8.7 I am trying add time zone in the site according to user's time zone (selected by the user from the drop down of time zones)Code is done as follows, but time zone is not getting saved

Re: [Rails] an advice to manage pdf documents.

2011-11-11 Thread Mauro
On 11 November 2011 12:40, Michael Pavling pavl...@gmail.com wrote: On 11 November 2011 11:00, Mauro mrsan...@gmail.com wrote: Do you use paperclip? PS The biggest issues I had with paperclip was the unnormalised approach of adding four fields to your model for each file you want to attach,

Re: [Rails] an advice to manage pdf documents.

2011-11-11 Thread Michael Pavling
On 11 November 2011 11:40, Michael Pavling pavl...@gmail.com wrote: PS The biggest issues I had with paperclip was the unnormalised approach of adding four fields to your model for each file you want to attach, and that it doesn't (didn't?) allow multiple file attachments.

Re: [Rails] an advice to manage pdf documents.

2011-11-11 Thread Mauro
On 11 November 2011 12:42, Michael Pavling pavl...@gmail.com wrote: On 11 November 2011 11:40, Michael Pavling pavl...@gmail.com wrote: PS The biggest issues I had with paperclip was the unnormalised approach of adding four fields to your model for each file you want to attach, and that it

Re: [Rails] an advice to manage pdf documents.

2011-11-11 Thread Michael Pavling
On 11 November 2011 12:28, Mauro mrsan...@gmail.com wrote: Now, Company has_many documents and every document has a pdf file as attachemnt. Do you think this is a valid approach? Like I said, that's exactly what I do, so I guess I must think it's valid :-) You can always set up a has_many

[Rails] newbie question - How can I run the following Query in ActiveRecord ?

2011-11-11 Thread Mahmoud Abdel-Fattah
I'm totally rails newbie, and just started it a couple of days ago moving from PHP, so I've the following query, and want to know how can I do it using ActiveRecord SELECT `sites`.*, `snapshots`.*, `technologies`.* FROM `sites`, `snapshots`, `technologies` WHERE `sites`.id = '1' AND

[Rails] doubts

2011-11-11 Thread samar kuamr mishra
what is -REQUIRE -LOAD -EXTEND -INCLUDE in rails . plz send me with appropriate example . -- 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

[Rails] Prototype troubles with Rails 3.1.1 from 2.3.14

2011-11-11 Thread Capripot
I'm trying to transform a Rails 2.3.14 to 3.1.1 application. Prototype rails should provide all the lost remote_foo.. But it doesn't work at all for me. It's like if the gem was not enable anymore. I installed it, reinstalled it, bundle install/update, add/remove/add gem into Gemfile, test it

Re: [Rails] Prototype troubles with Rails 3.1.1 from 2.3.14

2011-11-11 Thread Walter Lee Davis
Have a look at the running code in Firebug, and see what the error is reported as. You may have some other 2.3-ism lingering that is causing an error. Walter On Nov 11, 2011, at 7:45 AM, Capripot capri...@gmail.com wrote: I'm trying to transform a Rails 2.3.14 to 3.1.1 application.

Re: [Rails] doubts

2011-11-11 Thread Phil Dobbin
On 11/11/11 12:36, samar kuamr mishra er.samarmis...@gmail.com wrote: what is -REQUIRE -LOAD -EXTEND -INCLUDE in rails . plz send me with appropriate example . Try http://api.rubyonrails.org/ for further information. Cheers, Phil... -- Nothing to see here... move

Re: [Rails] Prototype troubles with Rails 3.1.1 from 2.3.14

2011-11-11 Thread Capripot
Okay, but I get a NoMethodError, so I don't see my own view, just the error view. And I don't see any prototype gem referene onto the trace .. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this discussion on the web visit

Re: [Rails] doubts

2011-11-11 Thread Michael Pavling
Reads like a homework question to me... On 11 November 2011 12:36, samar kuamr mishra er.samarmis...@gmail.com wrote: what is -REQUIRE -LOAD -EXTEND -INCLUDE                in rails . plz send me with appropriate example . -- You received this message because you are subscribed to the

Re: [Rails] newbie question - How can I run the following Query in ActiveRecord ?

2011-11-11 Thread Colin Law
On 11 November 2011 12:02, Mahmoud Abdel-Fattah mahm...@abdel-fattah.net wrote: I'm totally rails newbie, and just started it a couple of days ago moving from PHP, so I've the following query, and want to know how can I do it using ActiveRecord SELECT `sites`.*, `snapshots`.*,

Re: [Rails] doubts

2011-11-11 Thread Colin Law
On 11 November 2011 12:36, samar kuamr mishra er.samarmis...@gmail.com wrote: what is -REQUIRE -LOAD -EXTEND -INCLUDE                in rails . plz send me with appropriate example . I don't think I have ever seen REQUIRE, LOAD, EXTEND or INCLUDE in a rails app. Colin -- You received

Re: [Rails] doubts

2011-11-11 Thread Phil Dobbin
On 11/11/11 13:18, Colin Law clan...@googlemail.com wrote: I don't think I have ever seen REQUIRE, LOAD, EXTEND or INCLUDE in a rails app. Looks like a cross between PHP, MySQL some kind of shell doings in the wrong case... Cheers, Phil... -- Nothing to see here... move along, move

Re: [Rails] newbie question - How can I run the following Query in ActiveRecord ?

2011-11-11 Thread Mahmoud Said
I think what you are trying to do is joins if your associations are set correctly, then something like below should work Site.joins(:snapshots).joins(:technologies).where(sites.id=1) *Note: *in the where clause, you cannot use :id=1 because :id with the joined tables will be ambigious... you

Re: [Rails] Prototype troubles with Rails 3.1.1 from 2.3.14

2011-11-11 Thread Walter Lee Davis
Then you have much larger issues than Prototype. Can you post the stack trace that you see on the error page in its entirety? Walter On Nov 11, 2011, at 8:12 AM, Capripot wrote: Okay, but I get a NoMethodError, so I don't see my own view, just the error view. And I don't see any prototype

Re: [Rails] Re: Update VirtualRails to Rails 3.1.1 and Ruby 1.9.2

2011-11-11 Thread Hassan Schroeder
On Thu, Nov 10, 2011 at 10:58 PM, Jason Wells li...@ruby-forum.com wrote: Then typing: $ rvm package install openssl just gives me ERROR: Unrecognized command line arguement: 'package' (see: 'rvm usage') Is there an alternative to this? A reason 'package' isn't an arguement for RVM

Re: [Rails] What is the best choice: REE or 1.9.3

2011-11-11 Thread Walter Lee Davis
On Nov 10, 2011, at 11:25 PM, Fabrício Kneipp wrote: Hi, What is the best choice for a linode 512 setup: ree or 1.9.3? Whith or without rvm? [ ] 's What are you going to run on it? Are all of the gems you plan to use 1.9.3-safe? Walter -- You received this message because you are

Re: [Rails] Prototype troubles with Rails 3.1.1 from 2.3.14

2011-11-11 Thread Capripot
I think it's completly relative to the gem prototype-rails. But I don't understand where is the problem. I added the gem and bundled it, Here is the complete trace page : --- NoMethodError in Conformity_certs#edit Showing

[Rails] Free Ruby on Rails hostin with shell account

2011-11-11 Thread Tom wakoski
Hello I would like to introduce free shell server shellmix.com. On shellmix.com you can get free shell account with big environment and with multiple IP addresses • HDD 200 MB • MySQL 10 MB • Proc20 • WWWPHP, GD, Curl, Mod_Rewrite, htaccess, htpasswd • VirtualHost • Domain hosting

[Rails] Modularizing filters to use with many models?

2011-11-11 Thread Carson Cole
How could one modularlize a group of filters to be used in many models? I like to avoid this (again, I am doing this in many models): class Something before_filter :a before_filter :b after_filter :c end and instead, just be able to do this (something like it) class Something end

[Rails] Re: Modularizing filters to use with many models?

2011-11-11 Thread Carson Cole
Meant to save callback instead of filter. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/2VtMqdlQkFUJ. To post to this group, send email to

[Rails] Action Mailer email verification

2011-11-11 Thread Leo M.
Hi guys, I'm starting a new app from scratch, and I'd need to make an email verification. What do you suggest to use? ActionMailer? Some other gem? I took a look around and I found Authlogic and Devise that do this kind of thing, but I messed a little bit with and they don't convince me a lot,

[Rails] how to use mutiple yields

2011-11-11 Thread Nike Mike
In my layout, i have mutiple layouts. Is there any way to reduce to a single line.Currently my layout likes this %=yield :head% %=yield :foot% %=yield :bottom% How to call this in a single method -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] Re: ERROR NoMethodError: private method `gsub!' called

2011-11-11 Thread Arne L.
Thank you very much! How very obvious to change that line. A pitty I haven't tried to change it that way. But now everything works just fine. I had the nearly same problem with the same versions of Ruby and Rails but on Ubuntu. In my case stylesheets etc. were loaded after some reloading of the