[Rails] Re: 500 error in production environment which I don't get in development env

2010-02-11 Thread Jens MF
I solved a part of that problem on my own! By starting Webrick i got the error details right on the console. What was going wrong? undefined method method occured. A table column could not be found on a model. Even after running migrations. The problem was that RAILS_ENV for some unknown reason

[Rails] Re: On-line Quizzes: any Rails gem orplugin ?

2010-02-11 Thread pavling
On Feb 10, 1:44 pm, Giorgio Robino li...@ruby-forum.com wrote: More specifically: I'm looking for a web app framework to realizze ON-LINE QUIZ examinations, possibly in Ruby on Rails. Have a look at Smerf (http://smerf.cascadia.com.au/?page_id=2) for a Rails questionnaire builder - you may

Re: [Rails] nil object - can anyone help?

2010-02-11 Thread Michael Pavling
On 10 February 2010 18:54, RubyonRails_newbie craigwest...@googlemail.com wrote: Can anyone see the obvious mistake? I could do with a fresh pair of eyes on this... :-) In your view you're accessing the instance variable @user, but you're not setting that anywhere in your controller (at least

Re: [Rails] when does 'dog' not equal 'dog'?

2010-02-11 Thread Michael Pavling
On 11 February 2010 00:57, fearless_fool rdp...@gmail.com wrote: Essentially, I've caught the = operator returning nil -- not -1, 0, or 1, but nil.  Schematically: Do you need the = operator? (specifically, nothing you're doing seems to care whether the compared string is bigger or smaller,

[Rails] Trying to update to rails 3.0 beta on ubuntu. For some reason none of the commands work ubuntu doesn't recognize rails exists. HELP!

2010-02-11 Thread princezuda
Hi, I'm about to go out of my mind. I've been literally working all day on installing rails 3.0 beta. I have followed the steps in the ruby on rails release notes to a T. I've installed all of it's neccesary gems and than I try installing it by gem install rails --pre . I watch it install all of

Re: [Rails] Re: nil object - can anyone help?

2010-02-11 Thread Michael Pavling
On 10 February 2010 19:54, RubyonRails_newbie craigwest...@googlemail.com wrote: in that case, would it make more sense to add it to a page when a user is already logged in? I've just tried adding it to the invitation's index page, and i get the same issue... If you're following a

[Rails] Re: Transaction not rolled back in Functional Test

2010-02-11 Thread Frederick Cheung
On Feb 10, 9:17 pm, Homer Simpson li...@ruby-forum.com wrote: However, when I run my functional test this the I do a user.find_by_name after the post is executed and it comes back with the user (should come back nil). I see the exception logged properly but the transaction just is not

[Rails] Re: undefined method join

2010-02-11 Thread Frederick Cheung
On Feb 10, 6:40 pm, JohnMerlino stoici...@aol.com wrote: Hey all, I get an undefined method `join' for #String  NoMethodError. One what line does this error occur? Also if you're going to post code, you might as well make it a complete piece of code - what you've posted there isn't

Re: [Rails] Trying to update to rails 3.0 beta on ubuntu. For some reason none of the commands work ubuntu doesn't recognize rails exists. HELP!

2010-02-11 Thread Conrad Taylor
On Wed, Feb 10, 2010 at 8:33 PM, princezuda kingz...@gmail.com wrote: Hi, I'm about to go out of my mind. I've been literally working all day on installing rails 3.0 beta. I have followed the steps in the ruby on rails release notes to a T. I've installed all of it's neccesary gems and than

[Rails] Re: On-line Quizzes: any Rails gem orplugin ?

2010-02-11 Thread Giorgio Robino
pavling wrote: Have a look at Smerf (http://smerf.cascadia.com.au/?page_id=2) for a Rails questionnaire builder - you may find that you can use this to tick most of your boxes. HTH Hi Rafal, HTH, - http://rexaminator.com is nice! probably a bit specific for my goal. - SMERF seem perfect!

Re: [Rails] Trying to update to rails 3.0 beta on ubuntu. For some reason none of the commands work ubuntu doesn't recognize rails exists. HELP!

2010-02-11 Thread Gianluca Tessarolo
Hi Conrad, I've installed rails 3 beta successfully on my Ubuntu Karmik Koala following exactly these instructions (it is working on postgresql too just installing pg gem !!!): gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n gem

[Rails] Re: Amending partials

2010-02-11 Thread Sam
Thanks for replying, I'd like to post an image but Iseem to be having a few issues posting the link on here, I used image shack to upload the image of the form but I cannot post the direct link or embedded link, i keep getting an error message saying We were unable to post your message. Not sure

[Rails] Validates_uniqueness_of problem

2010-02-11 Thread Hemant Bhargava
Hi guys, I have given a validation function (validates_uniqueness_of :email) in my model because i want email to be unique. So the problem is that whenever i want to update a record then also it validates. I mean i dont want it to validate while updating the record. It should happen only when i

[Rails] Re: Validates_uniqueness_of problem

2010-02-11 Thread Sharagoz --
I dont understand why you want to validate uniqueness only on create. Isnt it a problem if email is changed later to an address that already exists? The :on parameter is not available for validates_uniqueness_of, probably because it doesnt make any sense. If you really want to make the

[Rails] Re: Error when starting rails server [on rails 3]

2010-02-11 Thread Joep Arts
Great; this worked like a charm. Thanks. Funny how the rails 3 beta app works better with an older version of this gem. -- 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] Re: Amending partials

2010-02-11 Thread Sharagoz --
If the code is too long to copy/paste directly into the post, then you can create a public gist on github and link to that: http://gist.github.com/ -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: Transaction not rolled back in Functional Test

2010-02-11 Thread Homer Simpson
Frederick Cheung wrote: On Feb 10, 9:17�pm, Homer Simpson li...@ruby-forum.com wrote: Tests are special, because each test already runs within a transaction. In rails 2.3 Active Record should be using savepoints as a substitute for actual nested transactions - do your logs show that

[Rails] Re: nil object - can anyone help?

2010-02-11 Thread RubyonRails_newbie
cool thank you. All valid points... I think i'll go through the tutorial again. I may have missed something. cheers On 10 Feb, 20:20, Michael Pavling pavl...@gmail.com wrote: On 10 February 2010 19:54, RubyonRails_newbie craigwest...@googlemail.com wrote: in that case, would it make more

[Rails] undefined method `sphinx_facets' for nil:NilClass

2010-02-11 Thread Rabia Akhtar
I am getting A NoMethodError occurred in main#search: undefined method `sphinx_facets' for nil:NilClass [RAILS_ROOT]/vendor/plugins/ thinking-sphinx/lib/thinking_sphinx/facet_search.rb:131:in `facet_from_object' Its occur in special scenerio... Can any body tell me when and how to resolve

[Rails] Re: 500 error in production environment which I don't get in development env

2010-02-11 Thread Gourav
Yes Jens, you can enable logging in production: in your environments/production.rb file enable log level to :debug, as config.log_level = :debug //uncomment this line -Gourav On Feb 11, 12:21 pm, Jens MF jens.is.loca...@googlemail.com wrote: Hi: I get a strange 500 error in production

[Rails] Re: CRUD pattern for modals

2010-02-11 Thread Gourav
If you really want to have a pop-up and don't want to deal with Ajax at all, then I would suggest fancybox http://fancybox.net It is actually an iframe, but gives you a popup like feeling and you can use your normal controller, just that in click of a link, it will open the fancybox and serve you

[Rails] Re: Model not found in custom script...

2010-02-11 Thread Sharagoz --
Do you know how I can load or have available the resources/environment that myrails app uses into this script? It should happen automatically. Can you post the error message and stack trace? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] [ANN] Ripple 0.5 (Initial Release)

2010-02-11 Thread Sean Cribbs
This is a quick message to announce the first release of Ripple, a rich Ruby client for Riak. (say that 10 times fast!) Full release commentary is available on my blog at http://seancribbs.com/tech/2010/02/10/introducing-ripple-0-5-you-got-your-riak-in-my-ruby/. Here's some links to get you

[Rails] Re: CRUD pattern for modals

2010-02-11 Thread Sharagoz --
Another option is rb-lightbox, which is made for RoR (and depends on prototype) http://code.google.com/p/rb-lightbox-plugin/ It gives you functions like link_to_lightbox and link_to_remote_lightbox (ajax). -- Posted via http://www.ruby-forum.com/. -- You received this message because you

[Rails] uninitialized constant Paginator |rails 2.2.2

2010-02-11 Thread Newb Newb
Hello All, the below error driving me mad... uninitialized constant SearchController::Paginator i m using rails 2.2.2 version .i hope paginator is rails built in class.. then why it shows me error. Expecting solution for my error .. Thanks for your time. -- Posted via

Re: [Rails] Validates_uniqueness_of problem

2010-02-11 Thread Mat Brown
On Thu, Feb 11, 2010 at 05:37, Hemant Bhargava li...@ruby-forum.com wrote: Hi guys, I have given a validation function (validates_uniqueness_of :email) in my model because i want email to be unique. So the problem is that whenever i want to update a record then also it validates. I mean i

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

2010-02-11 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 So I looked into Vestal

[Rails] Session based Routing

2010-02-11 Thread LeonS
Hi, I'm developing a site with a Login on the frontpage, so when you logged in you will see another thing than if you are not logged in. For Example you will see some explanations about the site if you are a visitor, but if you are logged in you will some things specific for you and i want to

Re: [Rails] Session based Routing

2010-02-11 Thread Mat Brown
On Thu, Feb 11, 2010 at 08:23, LeonS leonard.stellbr...@gmail.com wrote: Hi, I'm developing a site with a Login on the frontpage, so when you logged in you will see another thing than if you are not logged in. For Example you will see some explanations about the site if you are a visitor,

Re: [Rails] Re: Transaction not rolled back in Functional Test

2010-02-11 Thread Colin Law
On 11 February 2010 11:34, Homer Simpson li...@ruby-forum.com wrote: Frederick Cheung wrote: On Feb 10, 9:17�pm, Homer Simpson li...@ruby-forum.com wrote: Tests are special, because each test already runs within a transaction. In rails 2.3 Active Record should be using savepoints as a

Re: [Rails] Re: AJAX responses

2010-02-11 Thread Peter De Berdt
In my opinion, there's three ways to go about this: 1. Pregenerate reports in low traffic/low CPU usage times, like overnight. Since you are making monthly invoicing reports, the reports should stay the same anyway. When the user requests a certain range, assemble the cached pieces into on

Re: [Rails] undefined method `sphinx_facets' for nil:NilClass

2010-02-11 Thread Peter De Berdt
On 11 Feb 2010, at 12:48, Rabia Akhtar wrote: I am getting A NoMethodError occurred in main#search: undefined method `sphinx_facets' for nil:NilClass [RAILS_ROOT]/vendor/plugins/ thinking-sphinx/lib/thinking_sphinx/facet_search.rb:131:in `facet_from_object' Its occur in special

[Rails] Re: uninitialized constant Paginator |rails 2.2.2

2010-02-11 Thread Frederick Cheung
On Feb 11, 12:40 pm, Newb Newb li...@ruby-forum.com wrote: Hello All, the below error driving me mad... uninitialized constant SearchController::Paginator i m using rails 2.2.2 version .i hope paginator is rails built in class.. That was removed from rails in 2.0 (ie over 2 years ago if

[Rails] plural table names?

2010-02-11 Thread hkhkhk
should we follow the convention? or use singular? -- 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: Re: Transaction not rolled back in Functional Test

2010-02-11 Thread Homer Simpson
Colin Law wrote: On 11 February 2010 11:34, Homer Simpson li...@ruby-forum.com wrote: Delete the log file then run just that test. Then you will see what happened. Colin All I see in the test.log is a few selects, an insert (that should be rolled back), the rendering messages, the

[Rails] Re: Parameterized ActiveRecord Associations: Any such thing?

2010-02-11 Thread Frederick Cheung
On Feb 11, 2:46 am, Kendall Gifford zettab...@gmail.com wrote: On Feb 10, 7:27 pm, Erol Fornoles erol.forno...@gmail.com wrote: Cool, I didn't know that the evaluated result (Array-like-thingy) of an association could in turn be used to access named scopes w/in the associated class. Works

Re: [Rails] Re: Console not working

2010-02-11 Thread Trausti Thor Johannsson
There is no code really. I just create a new app like rails newapp then wait cd newapp script/generate model user username:string Then I go to the database and enter a few users then I run script/console and type allusers = User.all except there is no User object to be found. I can't

[Rails] Re: Console not working

2010-02-11 Thread Frederick Cheung
On Feb 11, 2:18 pm, Trausti Thor Johannsson traust...@gmail.com wrote: There is no code really.  I just create a new app like rails newapp then wait cd newapp script/generate model user username:string Then I go to the database and enter a few users then I run script/console and

[Rails] Re: Validates_uniqueness_of problem

2010-02-11 Thread Hemant Bhargava
The reason that your approach doesn't work is that you're still calling validates_uniqueness_of on your class. This is telling it, from now on, check uniqueness of this column any time the record is saved. In effect, it's no different from just putting that code directly in the class body.

[Rails] Net::IMAP problem

2010-02-11 Thread Hemant Bhargava
Hello all, My Ruby script: require net/imap imap = Net::IMAP.new('my server') imap.authenticate('LOGIN','myuser','mypassword') On the 3rd line I get a NO response exception raised (indicating that the IMAP server replied NO) and the error message Net::IMAP::NoResponseError: Unsupported

[Rails] Inconsistent Hash#to_xml Method

2010-02-11 Thread TomRossi7
I have a unit test that demonstrates some inconsistent behavior with a Hash being converted to XML with the :root option. Sometimes it works fine: Hash.new.to_xml(:root = 'test') ?xml version=\1.0\ encoding=\UTF-8\?\ntest\n/test\n But sometimes I get an argument error: Hash.new.to_xml(:root =

[Rails] Re: plural table names?

2010-02-11 Thread Jeff
Definitely ignore as many conventions as you can, and thereby make development as hard as possible on yourself. On Feb 11, 5:14 am, hkhkhk henry@gmail.com wrote: should we follow the convention?   or use singular? -- You received this message because you are subscribed to the Google

Re: [Rails] Inconsistent Hash#to_xml Method

2010-02-11 Thread Peter De Berdt
On 11 Feb 2010, at 15:43, TomRossi7 wrote: I have a unit test that demonstrates some inconsistent behavior with a Hash being converted to XML with the :root option. Sometimes it works fine: Hash.new.to_xml(:root = 'test') ?xml version=\1.0\ encoding=\UTF-8\?\ntest\n/test\n But sometimes I

[Rails] Re: Inconsistent Hash#to_xml Method

2010-02-11 Thread TomRossi7
Yep! I found an old plugin that was actually overwriting the Hash#to_xml method! Thanks! --Tom On Feb 11, 10:23 am, Peter De Berdt peter.de.be...@pandora.be wrote: On 11 Feb 2010, at 15:43, TomRossi7 wrote: I have a unit test that demonstrates some inconsistent behavior with a Hash being

Re: [Rails] Re: undefined method join

2010-02-11 Thread Jeffrey L. Taylor
Quoting Frederick Cheung frederick.che...@gmail.com: On Feb 10, 6:40 pm, JohnMerlino stoici...@aol.com wrote: Hey all, I get an undefined method `join' for #String  NoMethodError. join isn't defined for strings. Arrays of strings, yes, a single string, no. Jeffrey -- You

Re: [Rails] Re: undefined method join

2010-02-11 Thread Curtis Cooley
On Thu, Feb 11, 2010 at 7:37 AM, Jeffrey L. Taylor r...@abluz.dyndns.org wrote: Quoting Frederick Cheung frederick.che...@gmail.com: On Feb 10, 6:40 pm, JohnMerlino stoici...@aol.com wrote: Hey all, I get an undefined method `join' for #String  NoMethodError. join isn't defined for

[Rails] Rails 3 (beta) - Where are 'bundle' gems installed?

2010-02-11 Thread John T.
In testing out Rails 3 (beta) and following the blog posts to get sample apps created, and updating old apps, I used the new 'bundle' command to get all the required gems installed. But - I'm wondering where it is installing these gems? I just did 'bundle install' and it installed a bunch of

[Rails] Re: Rails 3 (beta) - Where are 'bundle' gems installed?

2010-02-11 Thread Erol Fornoles
On Feb 11, 11:48 pm, John T. li...@ruby-forum.com wrote: In testing out Rails 3 (beta) and following the blog posts to get sample apps created, and updating old apps, I used the new 'bundle' command to get all the required gems installed. But - I'm wondering where it is installing these gems?

[Rails] .find() with simple :join

2010-02-11 Thread John Mcleod
Hello all, I about to pull my hair out. I have two models Activities and Activity_types Activities -- id name activity_type_id Activity_types -- id name - Associations - class Activity ActiveRecord::Base has_many :activity_types end class ActivityType

Re: [Rails] .find() with simple :join

2010-02-11 Thread Mat Brown
You've got your has_many and belongs_to backwards. On Thu, Feb 11, 2010 at 11:34, John Mcleod li...@ruby-forum.com wrote: Hello all, I about to pull my hair out. I have two models Activities and Activity_types Activities -- id name activity_type_id Activity_types

Re: [Rails] Re: plural table names?

2010-02-11 Thread Rick DeNatale
On Thu, Feb 11, 2010 at 9:47 AM, Jeff cohen.j...@gmail.com wrote: Definitely ignore as many conventions as you can, and thereby make development as hard as possible on yourself. Ah yes, Consternation over Convention! -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter:

[Rails] Re: Validates_uniqueness_of problem

2010-02-11 Thread Frederick Cheung
On Feb 11, 12:51 pm, Mat Brown m...@patch.com wrote: class ModelName   validates_uniqueness_of :email, :if = proc { |model| model.new_record? } end and in cases like this where you just want to call a method you can do :if = :new_record? Fred -- You received this message because you are

[Rails] Re: .find() with simple :join

2010-02-11 Thread John Mcleod
Thanks Mat, That did it. I checked with debug and how do I get the type Name? 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

Re: [Rails] Session based Routing

2010-02-11 Thread Greg Donald
On Thu, Feb 11, 2010 at 7:23 AM, LeonS leonard.stellbr...@gmail.com wrote: I'm developing a site with a Login on the frontpage, so when you logged in you will see another thing than if you are not logged in. Something like: %= render partial = session[:user_id] ? 'logged_in' :

[Rails] repeated methods in rjs

2010-02-11 Thread Me
Is there a way to use any kind of helper or something if you do the same thing on every rjs call? Like render a flash box div? -- 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

Re: [Rails] Re: Validates_uniqueness_of problem

2010-02-11 Thread Mat Brown
On Thu, Feb 11, 2010 at 11:57, Frederick Cheung frederick.che...@gmail.com wrote: On Feb 11, 12:51 pm, Mat Brown m...@patch.com wrote: class ModelName   validates_uniqueness_of :email, :if = proc { |model| model.new_record? } end and in cases like this where you just want to call a method

[Rails] Re: repeated methods in rjs

2010-02-11 Thread Marnen Laibow-Koser
Chris Habgood wrote: Is there a way to use any kind of helper or something if you do the same thing on every rjs call? Like render a flash box div? Why not write JavaScript directly in unobtrusive style, and call the appropriate function as necessary? Best, --  Marnen Laibow-Koser

Re: [Rails] Re: .find() with simple :join

2010-02-11 Thread Mat Brown
On Thu, Feb 11, 2010 at 11:56, John Mcleod li...@ruby-forum.com wrote: Thanks Mat, That did it. I checked with debug and how do I get the type Name? John -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: .find() with simple :join

2010-02-11 Thread John Mcleod
if I include :include = :activity_type, then I get the name. debug @activities - !ruby/object:Activity activity_type: id001 !ruby/object:ActivityType attributes: name: Budgeting created_at: 2010-01-25 14:38:25 updated_at: 2010-01-25 14:38:25 id: 1

[Rails] Re: repeated methods in rjs

2010-02-11 Thread Me
It is a full ajax site. flash gets rendered on every call, nothing in it if it is empty anyway. On Feb 11, 11:06 am, Marnen Laibow-Koser li...@ruby-forum.com wrote: Chris Habgood wrote: Is there a way to use any kind of helper or something if you do the same thing on every rjs call?  Like

[Rails] [ANN] released Property gem

2010-02-11 Thread Gaspard Bucher
Hi there ! Just a quick note to let you know that zena has produced a new funky gem: It's called Property and lets you wrap rails model attributes into a single database column and declare properties from within the model. http://bit.ly/ai9wmC Rails scaffolding and replacing the migration by

Re: Re: [Rails] undefined method join

2010-02-11 Thread JohnMerlino
So why does the example in rails guide work and not mine, where I tried to copy as close to it as possible? All I'm trying to do is update another table from a form. Thanks. Curtis Cooley-3 wrote: On Thu, Feb 11, 2010 at 7:37 AM, Jeffrey L. Taylor r...@abluz.dyndns.org wrote: Quoting

[Rails] Re: Net::IMAP problem

2010-02-11 Thread Paul Harrington
Hemant Bhargava wrote: Hello all, My Ruby script: require net/imap imap = Net::IMAP.new('my server') imap.authenticate('LOGIN','myuser','mypassword') On the 3rd line I get a NO response exception raised (indicating that the IMAP server replied NO) and the error message

[Rails] Re: repeated methods in rjs

2010-02-11 Thread Marnen Laibow-Koser
Please quote when replying -- otherwise we don't know what you're responding to. Chris Habgood wrote: It is a full ajax site. flash gets rendered on every call, nothing in it if it is empty anyway. So what? That's irrelevant to the advice I gave, isn't it? Best, --  Marnen Laibow-Koser

Re: Re: [Rails] undefined method join

2010-02-11 Thread JohnMerlino
So why does the example in rails guide work and not mine, where I tried to copy as close to it as possible? All I'm trying to do is update another table from a form. Thanks. Curtis Cooley-3 wrote: On Thu, Feb 11, 2010 at 7:37 AM, Jeffrey L. Taylor r...@abluz.dyndns.org wrote: Quoting

[Rails] Re: repeated methods in rjs

2010-02-11 Thread Me
Ok, how would I implement the manual JS version to get called automatically on every rjs render? On Feb 11, 11:56 am, Marnen Laibow-Koser li...@ruby-forum.com wrote: Please quote when replying -- otherwise we don't know what you're responding to. Chris Habgood wrote: It is a full ajax site.

[Rails] Re: Re: .find() with simple :join

2010-02-11 Thread John Mcleod
Thanks for help. 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: repeated methods in rjs

2010-02-11 Thread Marnen Laibow-Koser
For the second time: please quote when replying! Chris Habgood wrote: Ok, how would I implement the manual JS version to get called automatically on every rjs render? Why do you need RJS? Best, --  Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via

[Rails] Re: .find() with simple :join

2010-02-11 Thread Me
activity.activitytypes.name On Feb 11, 11:10 am, John Mcleod li...@ruby-forum.com wrote: if I include :include = :activity_type, then I get the name. debug @activities - !ruby/object:Activity   activity_type: id001 !ruby/object:ActivityType     attributes:       name: Budgeting      

[Rails] Re: repeated methods in rjs

2010-02-11 Thread Me
Why do you need RJS? It is an ajax call On Feb 11, 12:04 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: For the second time: please quote when replying! Chris Habgood wrote: Ok, how would I implement the manual JS version to get called automatically on every rjs render? Why do

[Rails] Re: plural table names?

2010-02-11 Thread Me
Really makes sense. A table has a collection of objects, plural. On Feb 11, 10:43 am, Rick DeNatale rick.denat...@gmail.com wrote: On Thu, Feb 11, 2010 at 9:47 AM, Jeff cohen.j...@gmail.com wrote: Definitely ignore as many conventions as you can, and thereby make development as hard as

Re: [Rails] Session based Routing

2010-02-11 Thread Rick DeNatale
On Thu, Feb 11, 2010 at 11:56 AM, Greg Donald gdon...@gmail.com wrote: On Thu, Feb 11, 2010 at 7:23 AM, LeonS leonard.stellbr...@gmail.com wrote: I'm developing a site with a Login on the frontpage, so when you logged in you will see another thing than if you are not logged in. Something

Re: Re: [Rails] undefined method join

2010-02-11 Thread Rick DeNatale
On Thu, Feb 11, 2010 at 12:58 PM, JohnMerlino stoici...@aol.com wrote: So why does the example in rails guide work and not mine, where I tried to copy as close to it as possible? All I'm trying to do is update another table from a form. Thanks. If you show us the walkback, and not just the

[Rails] Re: repeated methods in rjs

2010-02-11 Thread Marnen Laibow-Koser
Chris Habgood wrote: Why do you need RJS? It is an ajax call That doesn't require RJS. Best, --  Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

Re: [Rails] Re: repeated methods in rjs

2010-02-11 Thread Chris Habgood
That doesn't require RJS. Ok, this is an early build out I do not want updates in the controller ase may have additional stuff in the future and i do not want the controller cluttered up. On Thu, Feb 11, 2010 at 12:27 PM, Marnen Laibow-Koser li...@ruby-forum.comwrote: Chris Habgood wrote:

[Rails] lost User session when back from REST web service..

2010-02-11 Thread Erwin
Once logged in and authenticated (using Authlogic), a user in my app can upload a media file into a Remote Media Server , using a form. In the form there is an url back upon success. Fine, the file uploads correctly, the url_back is used upon success and parameters are passed back (media_id)

[Rails] Re: Re: repeated methods in rjs

2010-02-11 Thread Marnen Laibow-Koser
Chris Habgood wrote: That doesn't require RJS. Ok, this is an early build out I do not want updates in the controller ase may have additional stuff in the future and i do not want the controller cluttered up. On Thu, Feb 11, 2010 at 12:27 PM, Marnen Laibow-Koser Who said anything about

Re: [Rails] Re: repeated methods in rjs

2010-02-11 Thread Greg Donald
On Thu, Feb 11, 2010 at 12:27 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Chris Habgood wrote: Why do you need RJS? It is an ajax call That doesn't require RJS. Why the war on RJS? It's been working great for me since Rails 0.8. -- Greg Donald destiney.com | gregdonald.com --

Re: [Rails] Re: Re: repeated methods in rjs

2010-02-11 Thread Greg Donald
On Thu, Feb 11, 2010 at 12:39 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Who said anything about cluttering the controller?  RJS serves no useful purpose as far as I can see (I could be wrong). Serves no useful purpose? The one I wrote a few minutes ago seems damn useful to me and my

[Rails] Re: Re: repeated methods in rjs

2010-02-11 Thread Marnen Laibow-Koser
Greg Donald wrote: On Thu, Feb 11, 2010 at 12:27 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Chris Habgood wrote: Why do you need RJS? It is an ajax call That doesn't require RJS. Why the war on RJS? What war? It doesn't seem to be serving the OP well. It's been working

[Rails] recursive expansition of % ... %

2010-02-11 Thread Ralph Shnelvar
In a controller I have @message = The size is % @a.size %. In the view I have %= @message % which, sadly, produces The size is % @a.size %. rather than, say, The size is 4. If I try %= %= @ message % % I get a syntax error. Is there a solution? -- Posted via

[Rails] Re: plural table names?

2010-02-11 Thread hkhkhk
I ask because I've seen debate on it and am not sure if the community has reached a consensus. Objects named person corresponding to a table named people seems brokenS, but I'm happy to do whatever is most standard. Perhaps this issue is a dead horse? On Feb 11, 9:47 am, Jeff

[Rails] Re: Re: Re: repeated methods in rjs

2010-02-11 Thread Marnen Laibow-Koser
Greg Donald wrote: On Thu, Feb 11, 2010 at 12:39 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Who said anything about cluttering the controller? �RJS serves no useful purpose as far as I can see (I could be wrong). Serves no useful purpose? The one I wrote a few minutes ago seems

Re: [Rails] recursive expansition of % ... %

2010-02-11 Thread Mat Brown
The % ... % style of interpolation is specific to ERB templates; it's not used to interpolate in Ruby strings. What you're looking for is: @message = The size is #...@a.size} I suggest familiarizing yourself with Ruby before diving into Rails. On Thu, Feb 11, 2010 at 13:43, Ralph Shnelvar

[Rails] How to catch Oracle errors in a rake task.

2010-02-11 Thread sultan
How can I trap the following Oracle error in a rake task? I can trap most Oracle errors in the website with �...@phone.errors.count 0”, but in the rake task the task stops before a check can be done. The rake task used to work before the Oracle DB administrator decided to put in foreign key,

Re: [Rails] Re: Re: repeated methods in rjs

2010-02-11 Thread Chris Habgood
Anyway, you're being so vague about the structure of your app that it's not possible to help. Try providing more information. It is a full ajax app. Meaning, the only real page refreshes are when logging in and out. We have a ton of ajax calls. I was just trying to DRY up the rjs files if we

Re: [Rails] Re: Re: repeated methods in rjs

2010-02-11 Thread Greg Donald
On Thu, Feb 11, 2010 at 12:42 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Why the war on RJS? What war?  It doesn't seem to be serving the OP well. And since by your own admission you know little to nothing about RJS templates, what makes you an authority to dismiss them as useless?  

[Rails] Re: plural table names?

2010-02-11 Thread Marnen Laibow-Koser
hkhkhk wrote: I ask because I've seen debate on it and am not sure if the community has reached a consensus. The Rails convention is to use plural table names. Objects named person corresponding to a table named people seems brokenS, Why? One object is one person. The table contains

Re: [Rails] Re: Re: Re: repeated methods in rjs

2010-02-11 Thread Greg Donald
On Thu, Feb 11, 2010 at 12:47 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Personal attacks do not belong on this list, or any other. Well someone had to say something, I'm sick of reading the crap you post. -- Greg Donald destiney.com | gregdonald.com -- You received this message

[Rails] Re: Re: Re: repeated methods in rjs

2010-02-11 Thread Marnen Laibow-Koser
Greg Donald wrote: On Thu, Feb 11, 2010 at 12:42 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Why the war on RJS? What war? �It doesn't seem to be serving the OP well. And since by your own admission you know little to nothing about RJS templates, what makes you an authority to

Re: [Rails] How to catch Oracle errors in a rake task.

2010-02-11 Thread Greg Donald
On Thu, Feb 11, 2010 at 12:48 PM, sultan sultan.bha...@gmail.com wrote: How can I trap the following Oracle error in a rake task? Ruby has exception handling: http://ruby-doc.org/docs/ProgrammingRuby/html/tut_exceptions.html I can trap most Oracle errors in the website with

[Rails] Re: recursive expansition of % ... %

2010-02-11 Thread Ralph Shnelvar
Mat Brown wrote: The % ... % style of interpolation is specific to ERB templates; it's not used to interpolate in Ruby strings. What you're looking for is: @message = The size is #...@a.size} I suggest familiarizing yourself with Ruby before diving into Rails. Ok ... I tried to make my

[Rails] Re: Re: Re: Re: repeated methods in rjs

2010-02-11 Thread Marnen Laibow-Koser
Greg Donald wrote: On Thu, Feb 11, 2010 at 12:47 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Personal attacks do not belong on this list, or any other. Well someone had to say something, I'm sick of reading the crap you post. Then don't read it and don't make attacks like this.

Re: [Rails] Re: Re: Re: repeated methods in rjs

2010-02-11 Thread Greg Donald
On Thu, Feb 11, 2010 at 12:58 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Why do you prefer RJS to writing JavaScript? RJS is a template rendering system that also happens to execute JS. I do not prefer one over the other, it's apples and oranges. Controller action: def get_user if

Re: [Rails] Re: Re: Re: Re: repeated methods in rjs

2010-02-11 Thread Greg Donald
On Thu, Feb 11, 2010 at 1:15 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Then don't read it and don't make attacks like this.  I'm sure everyone has posters they feel this way about -- I know I do -- but we don't say that kind of thing. I saw what I feel like saying, especially to big

[Rails] Re: repeated methods in rjs

2010-02-11 Thread Me
Ok, does anyone know how to do a page[:div].replace_html on every ajax call, helper or something like that? On Feb 11, 1:15 pm, Greg Donald gdon...@gmail.com wrote: On Thu, Feb 11, 2010 at 12:58 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Why do you prefer RJS to writing JavaScript?

[Rails] Migration commits when run by itself (db:migrate:up), but not with other migrations (db:migrate)

2010-02-11 Thread Adam Stegman
I have a migration that saves correctly to the database when it's run by itself through db:migrate:up, but not when it's run with other migrations through db:migrate. class SetActiveOnExistingItems ActiveRecord::Migration def self.up Item.all.each do |item| if item.item_status ==

[Rails] Re: How to catch Oracle errors in a rake task.

2010-02-11 Thread sultan
thanks for the response. I have validates_uniqueness_of :phone_number in the model, and it worked fine until the DBA got involved. Now for this error, Oracle just causes the rake task to abort rather than returning an error. On Feb 11, 12:59 pm, Greg Donald gdon...@gmail.com wrote: On Thu, Feb

Re: Re: [Rails] undefined method join

2010-02-11 Thread Curtis Cooley
I don't see where join is being called in the code you posted, but one thing that trips me up every once in a while is forgetting :all Student.find_by_last_name(Jones) returns a String where Student.find_all_by_last_name(Jones) or Student.find(:all, :conditions = last_name = 'Jones') returns

[Rails] Re: Re: Re: Re: repeated methods in rjs

2010-02-11 Thread Marnen Laibow-Koser
Greg Donald wrote: On Thu, Feb 11, 2010 at 12:58 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Why do you prefer RJS to writing JavaScript? RJS is a template rendering system that also happens to execute JS. I do not prefer one over the other, it's apples and oranges. OK. Perhaps I

  1   2   >