Re: [Rails] Re: Re: Re: Are those classes built-in?

2010-08-23 Thread Colin Law
On 22 August 2010 22:26, Abder-Rahman Ali li...@ruby-forum.com wrote: I'm using Rails 3. And, as mentiond I don't have scaffold.css, and have main.css. -- In your original post you said you are working from http://edgeguides.rubyonrails.org/getting_started.html. In section 6 it says that the

Re: [Rails] Re: Trying to make a user list from 2 fields

2010-08-23 Thread Colin Law
On 22 August 2010 23:04, Bob Smith bsm...@gmail.com wrote: Once again, please do not top post. Insert your reply a appropriate points in the previous message. Thanks What I need returned is a list of the names in the fields name and sname put together in alphabetical order with their ids so

[Rails] MYSQL Result Hash Problem

2010-08-23 Thread Sudheendra Panganamala
Hi, Is there any way to iterate through MySQL Result Hash multiple times ? Current Problem: After One iteration, second iteration no records. Need your help at the earliest. Regards, Sudheendra -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed

[Rails] Re: Rails 3: Error saving an object with no useful information

2010-08-23 Thread Heinz Strunk
No one? I'm kinda desperate with that problem... -- 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

Re: [Rails] MYSQL Result Hash Problem

2010-08-23 Thread Michael Pavling
On 23 August 2010 08:28, Sudheendra Panganamala li...@ruby-forum.com wrote: Hi, Is there any way to iterate through MySQL Result Hash multiple times ? Current Problem: After One iteration, second iteration no records. If you post the code you're having a problem with, then maybe we can make

Re: [Rails] Re: Get a collection using an array of ids, keeping the order

2010-08-23 Thread Michael Pavling
On 23 August 2010 03:18, Robert Head li...@ruby-forum.com wrote: Max Williams wrote: i think i'm going crazy.  Can anyone tell me if this is normal? You are not going crazy. I am! This is a reply to a two-year-old thread... I just wasted 10 minutes trying to find out why I hadn't received the

[Rails] Barry Flower is out of the office.

2010-08-23 Thread Barry Flower
I will be out of the office starting 23/08/2010 and will not return until 06/09/2010. I will be accessing my mail from time to time but for urgent issues please contact Kiran Joshi (IT Issues) or Adam Brand (Business Issues) or Steve Owens (Project, Planning or Finance Issues) or Maarten Tentij

Re: [Rails] can not connect to the mysql database

2010-08-23 Thread Colin Law
On 23 August 2010 06:18, Irfan Ahmed irfan...@gmail.com wrote: Please Irfan do not top post, insert your reply at the appropriate point in the previous message, this will help to follow the thread and also help to make sure you answer all the questions. Thanks In my previous mail I said: Are

[Rails] Re: Re: Re: Re: Are those classes built-in?

2010-08-23 Thread Abder-Rahman Ali
Colin Law wrote: On 22 August 2010 22:26, Abder-Rahman Ali li...@ruby-forum.com wrote: I'm using Rails 3. And, as mentiond I don't have scaffold.css, and have main.css. -- In your original post you said you are working from http://edgeguides.rubyonrails.org/getting_started.html. In

Re: [Rails] Re: Re: Re: Re: Are those classes built-in?

2010-08-23 Thread Colin Law
On 23 August 2010 09:07, Abder-Rahman Ali li...@ruby-forum.com wrote: Colin Law wrote: On 22 August 2010 22:26, Abder-Rahman Ali li...@ruby-forum.com wrote: I'm using Rails 3. And, as mentiond I don't have scaffold.css, and have main.css. -- In your original post you said you are working

[Rails] Re: [ Bangalore RUG] Implementation of instant messenger in rails app.

2010-08-23 Thread Piyush Gupta
Try Juggernaut . --- Regards, Piyush Gupta t: +91.977.990.9326 s: mba.piyushgupta w: blog.thebrainpoint.com On Mon, Aug 23, 2010 at 2:08 PM, santosh bt bt.santos...@gmail.com wrote: Hi Friends, I want to implement a chat application, such as Facebook poke kind, for one of my rails

Re: [Rails] My first gem

2010-08-23 Thread Edmond Kachale
2010/8/22 PsiPro arjes...@gmail.com Hello all, I just published my first gem, I've extracted it out from a project I'm working on and just hope it would be useful to others, and get some community improvment/suggestions. The code is located on github here

[Rails] Devise and Mailer

2010-08-23 Thread Christian Fazzini
Hello all, I am trying to get Devise and Mailer to work together. Whenever I send an email for the Forget password' section. It says: You will receive an email with instructions about how to reset your password in a few minutes. I am trying to send this to my gmail account for testing purposes.

[Rails] Re: Re: Re: Re: Re: Are those classes built-in?

2010-08-23 Thread Abder-Rahman Ali
Got you, 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-t...@googlegroups.com. To unsubscribe from this group, send email to

Re: [Rails] Help me... how to convert amchart to pdf

2010-08-23 Thread Edmond Kachale
2010/8/22 anton effendi wuyoud...@gmail.com Hi Guys I need help.. I want to making 1 controller for covert html to pdf.. Try using prawn gem (http://github.com/sandal/prawn) and prawnto plugin ( http://github.com/thorny-sun/prawnto/). They create PDF files on the fly. Prawn is able to render

[Rails] Re: determining link geo-location

2010-08-23 Thread Veera Sundaravel
Rajinder Yadav wrote: I am trying to figure out how to get the user's geo-location when a request comes in after they've clicked on a link. Is there a easy way to do this in rails, also is the geo-location provided by the user's browser, or is there another way this is determined? Thanks!

[Rails] Re: determining link geo-location

2010-08-23 Thread Frederick Cheung
On Aug 23, 1:45 am, Rajinder Yadav devguy...@gmail.com wrote: I am trying to figure out how to get the user's geo-location when a request comes in after they've clicked on a link. Is there a easy way to do this in rails, also is the geo-location provided by the user's browser, or is there

[Rails] Re: Devise and Mailer

2010-08-23 Thread Christian Fazzini
I am using Ruby 1.8.7, Rails 2.3.8 On Aug 23, 11:06 am, Christian Fazzini christian.fazz...@gmail.com wrote: Hello all, I am trying to get Devise and Mailer to work together. Whenever I send an email for the Forget password' section. It says: You will receive an email with instructions about

[Rails] Re: When after_save isn't after the save....

2010-08-23 Thread IAmNan
Thanks Fred and Danny. Fred thanks for the explanation. As mentioned, I am using Rails 3 and both I have them both native. I go from few options to several. Maybe I can clean up my code a little now. Sweet! :) I totally wouldn't have expected your explanation, Fred, but I see now it's right. I am

Re: [Rails] Re: incompatible character encodings: ASCII-8BIT and UTF-8

2010-08-23 Thread Chris Mear
On 22 August 2010 23:08, Sven Koesling li...@ruby-forum.com wrote: Gudleik Rasch wrote: I've been struggling with the same issue a few times, and the solution that worked for me was to use a different mysql driver: ruby-mysql # in config/environment.rb: config.gem 'ruby-mysql' # or in

Re: [Rails] can not connect to the mysql database

2010-08-23 Thread Irfan Ahmed
Oh I am sorry for my previous email as I was in a hurry and checking the mail from another place and replying. Now I am trying again! thanks On 23 August 2010 14:02, Colin Law clan...@googlemail.com wrote: On 23 August 2010 06:18, Irfan Ahmed irfan...@gmail.com wrote: Please Irfan do not top

[Rails] Re: When after_save isn't after the save....

2010-08-23 Thread Frederick Cheung
On Aug 23, 11:42 am, IAmNan dger...@gmail.com wrote: Thanks Fred and Danny. Fred thanks for the explanation. As mentioned, I am using Rails 3 and both I have them both native. I go from few options to several. Maybe I can clean up my code a little now. Sweet! :) I totally wouldn't have

[Rails] Re: Come on, share your Rails powered sites with others.//Fwd: A tornado powered site to show any project powered sites(open source)

2010-08-23 Thread Stone Puzzle
It's official online now after two weeks beta testing. A bunch of sites already been submitted, come on and enjoy it. Below list some popular projects' sub-sites: http://ror.poweredsites.org Ruby on Rails powered sites http://django.poweredsites.org Django powered sites

[Rails] Re: can not connect to the mysql database

2010-08-23 Thread gezope
Dear Irfan Ahmed Rizvi! I had many problems with databases in the beginning, especially with mysql. I read the same book. If you go further, there will be extremely good troubleshoots for you to help mysql configuration! I am quite sure, that your answer will be there! My way: 1. create and test

[Rails] Re: Devise and Mailer

2010-08-23 Thread Christian Fazzini
Ok figured out the problem. The reason why it wasn't reporting any errors was because I had config.action_mailer.raise_delivery_errors = false in my /config/environments/development.rb file Second, my configuration is wrong. I had: :enable_startttls_auto = true, Should be,

Re: [Rails] Re: can not connect to the mysql database

2010-08-23 Thread Irfan Ahmed
Dear Gezope Thanks for your inspiration, as I am new in this framework and of-course to new real life programing concept!. Please help me if you feel free and have time! I want to learn! -- Irfan Ahmed Rizvi http://www.creativemake.com -- You received this message because you are subscribed to

[Rails] Re: Invoking MouseOver using link_to tag ?

2010-08-23 Thread Andrew Faraday
%= link_to TestingMouseOverEvents , {:controller = login, :action = logout}, {onmouseover = jscode, onmouseout = jscode}% Having some difficulty doing this, I want to run a .rjs template on the mouseover event to show a hidden div, (and another on the mouse off to hide it) tho 'cause I have a

[Rails] Re: implementing project management and event types

2010-08-23 Thread richardsugg
Sorry for the delay -- I forgot to subscribe to the thread and didn't realize I had responses until I checked manually. I thought about STI, but it seems that I would have a very complex table. I did not realize, however, that I could include a bunch of has_one statements -- I assumed that since

[Rails] link_to_function

2010-08-23 Thread Pale Horse
I require some information, displayed at the top of a page, to change onclick. The information is in the following form: h1Namebr /spanJob role/span/h1 Description... %= link_to read more, :controller = controller, :action = show, :id = id % pspantelephone number/span/p There is an image to

Re: [Rails] link_to_function

2010-08-23 Thread Bill Walton
Hi, On Mon, Aug 23, 2010 at 8:38 AM, Pale Horse li...@ruby-forum.com wrote: I require some information, displayed at the top of a page, to change onclick. The information is in the following form: h1Namebr /spanJob role/span/h1 Description... %= link_to read more, :controller = controller,

[Rails] date_select equivalent for form_tag?

2010-08-23 Thread Fritz Trapper
Is there an equivalent for date_select to be used in a form_tag block? -- 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

[Rails] Re: Rails 3: Error saving an object with no useful information

2010-08-23 Thread pepe
Are you working from irb or the console? It seems that you are running your code from irb (irb(main):054:0 reload!;User.last.save!) and you might not have everything you need loaded. I just tried User.last.save! from the console on one of my apps and it works just fine. On Aug 23, 3:32 am, Heinz

[Rails] Re: Rails 3: Error saving an object with no useful information

2010-08-23 Thread pepe
Sorry, I didn't pay too much attention to the subject. My apps run under 2.3.5 and that might make things different, though. On Aug 23, 3:32 am, Heinz Strunk li...@ruby-forum.com wrote: No one? I'm kinda desperate with that problem... -- Posted viahttp://www.ruby-forum.com/. -- You received

[Rails] Re: date_select equivalent for form_tag?

2010-08-23 Thread Frederick Cheung
On Aug 23, 2:51 pm, Fritz Trapper li...@ruby-forum.com wrote: Is there an equivalent for date_select to be used in a form_tag block? select_date Fred -- Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Rails 2.3.8 or Rails 3 ?

2010-08-23 Thread Dani Dani
Hi, If I'm going to start developing a new rails based web application, should I go for Rails 3 or Rails 2.3.8 ? why this and not the other ? Thank you. Dani -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails:

[Rails] Re: Re: link_to underlying urls/paths are showing in the actual view

2010-08-23 Thread Matt Royer
Jule Nissen wrote: The visible path behind the links was generated by the css print layout. Everything works fine now! YES!!! Thanks everyone. This was driving me insane! I'm using the Blueprint CSS Framework. In the Print.css there is a line that reads: a:link:after, a:visited:after

[Rails] Re: link_to_function

2010-08-23 Thread Pale Horse
Bill Walton wrote: Hi, On Mon, Aug 23, 2010 at 8:38 AM, Pale Horse li...@ruby-forum.com wrote: There is an image to correspond with this. The image is not a problem; I have gotten this image to change on click with 'link_to_function'. The information above, excluding the image of course,

Re: [Rails] Re: Re: link_to underlying urls/paths are showing in the actual view

2010-08-23 Thread Colin Law
On 23 August 2010 15:58, Matt Royer li...@ruby-forum.com wrote: Jule Nissen wrote: The visible path behind the links was generated by the css print layout. Everything works fine now! YES!!! Thanks everyone. This was driving me insane! I'm using the Blueprint CSS Framework. In the Print.css

Re: [Rails] Re: link_to_function

2010-08-23 Thread Bill Walton
Hi, On Mon, Aug 23, 2010 at 10:02 AM, Pale Horse li...@ruby-forum.com wrote: Bill Walton wrote: Hi, On Mon, Aug 23, 2010 at 8:38 AM, Pale Horse li...@ruby-forum.com wrote: There is an image to correspond with this. The image is not a problem; I have gotten this image to change on click

Re: [Rails] Help me... how to convert amchart to pdf

2010-08-23 Thread Edmond Kachale
hmm.. I have 1 page.. that page have flash(swf)... and have one button to export to pdf What technology are you using to export to PDF? I hope there should be a way of rendering the swf file (though it will be motionless :-) ). When I clicked that button, I want to exporting that

Re: [Rails] Help me... how to convert amchart to pdf

2010-08-23 Thread Peter De Berdt
On 23 Aug 2010, at 17:08, Edmond Kachale wrote: I have 1 page.. that page have flash(swf)... and have one button to export to pdf What technology are you using to export to PDF? I hope there should be a way of rendering the swf file (though it will be motionless :-) ). When I

Re: [Rails] link_to_function

2010-08-23 Thread Christopher Meiklejohn
On Mon, Aug 23, 2010 at 9:38 AM, Pale Horse li...@ruby-forum.com wrote: I require some information, displayed at the top of a page, to change onclick. The information is in the following form: h1Namebr /spanJob role/span/h1 Description... %= link_to read more, :controller = controller,

[Rails] Re: Re: incompatible character encodings: ASCII-8BIT and UTF-8

2010-08-23 Thread Sven Koesling
As an alternative to ruby-mysql, which is a little slow, you might want to try the 'mysql2' gem, which is an updated version of the original 'mysql' gem, and which has native extensions to hook into the MySQL C library, making it faster. Chris Hello Chris, thank You very much for this

[Rails] Re: date_select equivalent for form_tag?

2010-08-23 Thread Sandy
On Aug 23, 10:23 am, Frederick Cheung frederick.che...@gmail.com wrote: On Aug 23, 2:51 pm, Fritz Trapper li...@ruby-forum.com wrote: Is there an equivalent for date_select to be used in a form_tag block? select_date Fred -- Posted viahttp://www.ruby-forum.com/.- Hide quoted text

[Rails] Re: Re: link_to_function

2010-08-23 Thread Pale Horse
Bill Walton wrote: Hi, On Mon, Aug 23, 2010 at 10:02 AM, Pale Horse li...@ruby-forum.com wrote: If you know at the time of rendering the initial display what information needs to be displayed when the link is clicked, then you should probably render both sets of info inside two divs: one

[Rails] Re: Rails 3: Error saving an object with no useful information

2010-08-23 Thread Heinz Strunk
I'm using console and I restarted and reloaded it a couple of times. Rails 3.0.0.rc and Ruby 1.9.2 -- 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] Re: Rails 2.3.8 or Rails 3 ?

2010-08-23 Thread Robert Walker
Dani Dani wrote: Hi, If I'm going to start developing a new rails based web application, should I go for Rails 3 or Rails 2.3.8 ? why this and not the other ? Thank you. Dani From what I've seen even though Rails 2.3.8 is supposedly the current stable version of Rails, I'm betting that

[Rails] Re: Rails 3: Error saving an object with no useful information

2010-08-23 Thread Robert Walker
Heinz Strunk wrote: irb(main):054:0 reload!;User.last.save! Reloading... NameError: undefined local variable or method `to_ary' for #User:0x4ed5d20 from D:/ruby192/lib/ruby/gems/1.9.1/gems/activemodel-3.0.0.rc/lib/active_model/attribute_methods.rb:364:in `method_missing' What is

Re: [Rails] Re: Rails 2.3.8 or Rails 3 ?

2010-08-23 Thread Colin Law
On 23 August 2010 17:13, Robert Walker li...@ruby-forum.com wrote: Dani Dani wrote: Hi, If I'm going to start developing a new rails based web application, should I go for Rails 3 or Rails 2.3.8 ? why this and not the other ? Thank you. Dani From what I've seen even though Rails 2.3.8 is

[Rails] ActiveRecord::StatementInvalid Mysql::Error: MySQL server has gone away

2010-08-23 Thread anywho
Suddenly exceptional is sending emails about Mysql having gone away in production. This had not been an issue until, well, today. No changes have even been made. We see this with an internal product as well. Does anyone know how to prevent this from happening? Why isn't rails handling this more

Re: [Rails] Help me... how to convert amchart to pdf

2010-08-23 Thread anton effendi
Thank all. I'm using wkhtmltopdf and the amchart. Thank you for the logic. But amchart can;t convert into image. May be I must change the chart... do any body have another idea??Or only that way??? Thank you On Mon, Aug 23, 2010 at 10:21 PM, Peter De Berdt

[Rails] Paperclip not saving images

2010-08-23 Thread Kaspir Ghost
Hi, rails newb here. I'm trying to make a photo album app with rails. I'm using paperclip, because I need to upload multiple images at the same time. But when I upload a picture, paperclip isn't saving it. I'm not getting any errors, it just doesn't save it. I've gone through multiple tutorials

[Rails] rake task can't find installed gems

2010-08-23 Thread Allen Walker
I'm running a rake task and it complains there are Missing gems even though they are indeed installed. However from further inspection, it appears it is not looking in my GEM PATH (/usr/local/lib/ruby/1.8) but instead is looking in /usr/lib/ruby/gems/1.8. my gem env: RubyGems Environment: -

[Rails] Re: Paperclip not saving images

2010-08-23 Thread Fernando Perez
Try creating a photo manually, so in script/console type: Photo.create(:data = File.new(/path/to/a/file)) Also check the rails log file for any warning/error message, beware it can be hard to spot in all the lines that get printed. -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] Re: Paperclip not saving images

2010-08-23 Thread Kaspir Ghost
Photo.create(:data = File.new(/home/kaspir/Pictures/backgrounds/bg.png) didn't return anything. this is my development log error, although I'm not exactly sure what it means. Processing AlbumsController#create (for 127.0.0.1 at 2010-08-23 12:31:08) [POST] Parameters: {commit=Submit,

[Rails] Re: Re: how does the controller know about the model?

2010-08-23 Thread Marnen Laibow-Koser
Greg Donald wrote: On Fri, Aug 20, 2010 at 2:59 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: (BTW, I recommend switching from Test::Unit to RSpec as soon as possible.) I recommend staying with Test::Unit. It comes with Rails and works great. I'm glad you like it. It is my

[Rails] Re: Paperclip not saving images

2010-08-23 Thread Fernando Perez
There is a WARNING message in the log. Can't see it? I told you it was hard to spot. So to solve your problem or at least move a step forward, change Album so that it reads: attr_accessible :name, :photos_attributes -- Posted via http://www.ruby-forum.com/. -- You received this message

[Rails] Re: Rails 2.3.8 or Rails 3 ?

2010-08-23 Thread gkaykck
if you know RUBY very well, not rails, than there is no problem, go for rails 3. but if the reverse is true, if you know RAILS well not ruby, which most of people do, then stick with 2.3.8 On Aug 23, 5:55 pm, Dani Dani li...@ruby-forum.com wrote: Hi, If I'm going to start developing a new rails

Re: [Rails] Re: Re: how does the controller know about the model?

2010-08-23 Thread Greg Donald
On Mon, Aug 23, 2010 at 12:37 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: It is my experience, and that of a large number of other Rails developers, that using RSpec leads to more readable and maintainable tests They both do the exact same thing. The assertion syntax is nearly

[Rails] Re: Re: Re: how does the controller know about the model?

2010-08-23 Thread Marnen Laibow-Koser
Greg Donald wrote: On Mon, Aug 23, 2010 at 12:37 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: It is my experience, and that of a large number of other Rails developers, that using RSpec leads to more readable and maintainable tests They both do the exact same thing. The assertion

Re: [Rails] Re: Re: Re: how does the controller know about the model?

2010-08-23 Thread Greg Donald
On Mon, Aug 23, 2010 at 1:55 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: The extra typing is trivial compared to the advantage of actually having tests that don't require elaborate deciphering 6 months later. Test::Unit tests like I write are very easy to decipher: test should have a

[Rails] Re: Sharing sessions between a rails3 app and a rails2 app. Rails 2 app crashes.

2010-08-23 Thread gkaykck
you should share some code here, there could be many reasons for that On Aug 23, 4:21 am, Tim Uckun timuc...@gmail.com wrote: Hey all. I have two apps. One is a rails3 app and the other is a rails 2 app. Using proxying I am routing actions in the myapp.com/foo to the rails2 app. It almost

[Rails] Re: Invoking MouseOver using link_to tag ?

2010-08-23 Thread Marnen Laibow-Koser
Bojan Mihelac wrote: Add to Html options, like: %= link_to TestingMouseOverEvents , {:controller = login, :action = logout}, {onmouseover = jscode, onmouseout = jscode}% Bojan Mihelac Or better yet, don't. Use an external JS file and set the handlers there. JavaScript works best when

[Rails] Re: Re: Re: Re: how does the controller know about the model?

2010-08-23 Thread Marnen Laibow-Koser
Greg Donald wrote: On Mon, Aug 23, 2010 at 1:55 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: The extra typing is trivial compared to the advantage of actually having tests that don't require elaborate deciphering 6 months later. Test::Unit tests like I write are very easy to

[Rails] Field name with -

2010-08-23 Thread Eugeny Basov
Hello. I'm tryes to write webGUI for application's database. This application uses pre-defined field names, for i.e. session-timers and I can't change its. In the users.rb writes: def index @sipusers=User.all end In the index.html.erb: % @users.each do |user| % %=h user[session-timers]%

[Rails] how to include a module in a model

2010-08-23 Thread badnaam
I created a module MyModule my_module.rb and put in a lib folder in my rails app. In my User.rb model I call include MyModule. When I try to use a method inside MyModule I get an undefined method error. How do I include this module in the model? Thanks -- You received this message because

[Rails] Re: Field name with -

2010-08-23 Thread Eugeny Basov
def index @sipusers=User.all end Must read @users=User.all -- 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

[Rails] Re: how to include a module in a model

2010-08-23 Thread Marnen Laibow-Koser
badnaam wrote: I created a module MyModule my_module.rb and put in a lib folder in my rails app. In my User.rb model I call include MyModule. When I try to use a method inside MyModule I get an undefined method error. How do I include this module in the model? What you described should

[Rails] Re: Trying to make a user list from 2 fields

2010-08-23 Thread Bob Smith
On Aug 23, 3:24 am, Colin Law clan...@googlemail.com wrote: On 22 August 2010 23:04, Bob Smith bsm...@gmail.com wrote: Once again, please do not top post.  Insert your reply a appropriate points in the previous message.  Thanks What I need returned is a list of the names in the fields

[Rails] Re: how to include a module in a model

2010-08-23 Thread badnaam
Here is the code.. http://pastie.org/1110631 Thanks On Aug 23, 12:15 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: badnaam wrote: I created a module  MyModule my_module.rb and put in a lib folder in my rails app. In my User.rb model I call include MyModule. When I try to use a

[Rails] Re: how to include a module in a model

2010-08-23 Thread badnaam
http://pastie.org/1110631 On Aug 23, 12:15 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: badnaam wrote: I created a module  MyModule my_module.rb and put in a lib folder in my rails app. In my User.rb model I call include MyModule. When I try to use a method inside MyModule I get

[Rails] Unable to upload images using native rails file upload

2010-08-23 Thread Mr. Winnymann
I am a rails newbie and am trying to build my first app. I have a jobs and categories controller and models respectively. CONTROLLER: def new @job = Job.new @catergory = Catergory.all respond_to do |format| format.html # new.html.erb format.xml { render :xml = @job }

[Rails] Re: Unable to upload images using native rails file upload

2010-08-23 Thread Mr. Winnymann
There was a mistake while pasting I am a rails newbie and am trying to build my first app. I have a jobs and categories controller and models respectively. CONTROLLER: def new @job = Job.new @catergory = Catergory.all respond_to do |format| format.html # new.html.erb

Re: [Rails] Re: Re: Re: Re: how does the controller know about the model?

2010-08-23 Thread Greg Donald
On Mon, Aug 23, 2010 at 2:09 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: ...and you've conveniently left out the hard-to-read assert statements. test should have a first name do count = User.count( :all ) u = User.new( :email = 'foo...@example.com', :password = '',

Re: [Rails] Re: how to include a module in a model

2010-08-23 Thread Rob Biedenharn
I suspect that after you require validation_group.rb you want to have something like: ActiveRecord::Base.class_eval { extend ValidationGroup::ActiveRecord::ActsMethod } You need to get the validation_group method into ActiveRecord::Base and therefore User before you call it. -Rob On

Re: [Rails] Re: Rails 2.3.8 or Rails 3 ?

2010-08-23 Thread Colin Law
On 23 August 2010 19:31, gkaykck gkay...@gmail.com wrote: if you know RUBY very well, not rails, than there is no problem, go for rails 3. but if the reverse is true, if you know RAILS well not ruby, which most of people do, then stick with 2.3.8 Can you explain the logic of that please?

Re: [Rails] Re: Re: Re: how does the controller know about the model?

2010-08-23 Thread Greg Donald
On Mon, Aug 23, 2010 at 1:55 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: Who knows?  I can't speak for the core team.  My guess -- and it *is* a guess -- is that it's because the Rails core team has a bad case of Not Invented Here syndrome in some respects.  This is nicely fed into by

[Rails] Re: how to include a module in a model

2010-08-23 Thread badnaam
Rob, Are you saying I need to do a 1 - require 'validation_group' in my User.rb 2 - Then add ActiveRecord::Base.class_eval { extend ValidationGroup::ActiveRecord::ActsMethod } to my User.rb? Thanks On Aug 23, 12:44 pm, Rob Biedenharn r...@agileconsultingllc.com wrote: I suspect that after

[Rails] redirect_to referrer

2010-08-23 Thread Josh
Contrived example: class WelcomeController ApplicationController def first logger.debug REFERRER: #{request.referrer} logger.debug REQUEST_URL: #{request.request_uri} redirect_to :action = :second end def second logger.debug REFERRER: #{request.referrer} logger.debug

[Rails] Trying to get a list of households with one person in them

2010-08-23 Thread Bob Smith
@test = Household.count :all, :group = 'people.household_id', :joins = :people -- 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

Re: [Rails] Re: how to include a module in a model

2010-08-23 Thread Rob Biedenharn
On Aug 23, 2010, at 3:50 PM, badnaam wrote: On Aug 23, 12:44 pm, Rob Biedenharn r...@agileconsultingllc.com wrote: I suspect that after you require validation_group.rb you want to have something like: ActiveRecord::Base.class_eval { extend ValidationGroup::ActiveRecord::ActsMethod } You

[Rails] Trying to get a list of households with one person in them

2010-08-23 Thread Bob Smith
in my models, household has_many :people and people has_one :household household has a name field, and people has household_id the closest I got was: @test = Household.count :all, :group = 'people.household_id', :joins = :people this does group the families together and count the members, but

Re: [Rails] Re: Trying to make a user list from 2 fields

2010-08-23 Thread Colin Law
On 23 August 2010 20:20, Bob Smith bsm...@gmail.com wrote: When I suggested not top posting, I suggested inserting your post in the previous post in order that it appears after the question it is answering. Not just sticking the reply down the bottom. I have 2 name fields called name and sname.

[Rails] Favicon for api.rubyonrails.org documentation pages

2010-08-23 Thread sayeo87
It kind of annoys me that all the api.rubyonrails.org documentation pages don't have a Favicon. Would whoever is in charge of that be interested in adding one? Thanks, Suan -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] SWFupload and Rails 3

2010-08-23 Thread jeljer te Wies
He Guys! I have a problem with swfupload and have been on it for hours! .. i have no hair left on my head ! i am trying to get the swfupload working with rails 3 Of course i am able to upload with a simple file_field. also I am using paperclip (which works just fine). But when I try to upload

Re: [Rails] Trying to get a list of households with one person in them

2010-08-23 Thread Colin Law
On 23 August 2010 21:03, Bob Smith bsm...@gmail.com wrote: in my models, household has_many :people and people has_one :household household has a name field, and people has household_id That should be person belongs_to household. the closest I got was: @test = Household.count :all, :group =

[Rails] Button function in rails

2010-08-23 Thread Ithelp Eighty-five
I want to create a button function on a main page that updates the database, without having to open the form and editing and updating through the form. Anyone know how to do this, if it is possible? Thanks in advance for any help you can provide. -- Posted via http://www.ruby-forum.com/. --

Re: [Rails] Button function in rails

2010-08-23 Thread Colin Law
On 23 August 2010 21:16, Ithelp Eighty-five li...@ruby-forum.com wrote: I want to create a button function on a main page that updates the database, without having to open the form and editing and updating through the form. Do you mean you want just a button to appear, which when pressed posts

[Rails] Re: Re: Re: Re: Re: how does the controller know about the model?

2010-08-23 Thread Marnen Laibow-Koser
Greg Donald wrote: On Mon, Aug 23, 2010 at 2:09 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: ...and you've conveniently left out the hard-to-read assert statements. test should have a first name do count = User.count( :all ) u = User.new( :email = 'foo...@example.com',

Re: [Rails] Trying to get a list of households with one person in them

2010-08-23 Thread Rob Biedenharn
On Aug 23, 2010, at 4:15 PM, Colin Law wrote: On 23 August 2010 21:03, Bob Smith bsm...@gmail.com wrote: in my models, household has_many :people and people has_one :household household has a name field, and people has household_id That should be person belongs_to household. the

[Rails] MongoDb MongoMapper and Rails Oh MY!!

2010-08-23 Thread AzamSharp
For the past couple of hours I am trying to insert a simple document into MongoDb database using Rails and MongoMapper. There is no error but the document never gets inserted. Here is my simple class: class Post include MongoMapper::Document key :title, String, :required = true key

[Rails] Rails 3 routing for namespaced controllers

2010-08-23 Thread Sam Kong
Hi, I need to use legacy-style routing. And it's namespaced. According to http://edgeguides.rubyonrails.org/routing.html, it should be like the following. match ':controller(/:action(/:id))', :controller = /admin\/[^\/]+/ /admin/c1/a1 works fine. But the problem is that, if I have /c2/a2

[Rails] Dynamic Routes

2010-08-23 Thread Luigi M.
Hi, do you have a clean way to manage dynamic routes? There is a suggestion here with render_component but it is deprecated.. http://stackoverflow.com/questions/129510/is-it-a-bad-idea-to-reload-routes-dynamically-in-rails Thanks -- Posted via http://www.ruby-forum.com/. -- You received this

Re: [Rails] MongoDb MongoMapper and Rails Oh MY!!

2010-08-23 Thread Walter McGinnis
Have you used the console to query the MongoDB database and confirm that a document HASN'T been made? You could also walk through the steps to create a Post object from the console and see if that is successful. That should help isolate where the issue is. And why are you redirecting to new

[Rails] Cannot migrate database, strange error!

2010-08-23 Thread Zack Nathan
Im using restful authentication, and i changed the username model from login to username. The error is Mysql::Error: Key column 'login' doesn't exist in table: CREATE UNIQUE INDEX `index_users_on_login` Heres the trace: DEPRECATION WARNING: Rake tasks in

[Rails] Recommendations for Google Checkout integration

2010-08-23 Thread Wes Gamble
All, I need to be able to integrate with Google checkout. Does anyone have advice for which gem/plugin would be most appropriate to use to integrate with it? Many thanks, Wes -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] Re: rake db:create = LIBMYSQL.DLL not found. how to solve??

2010-08-23 Thread Sagar Jhobalia
m trying to run my hello world prgmsince 3hrs now!! pls help..1st i got the above stated error..on solvin tatthnks 2 u'll now i am getting : /!\ FAILSAFE /!\ 2010-08-24 03:27:09 +0530 Status: 500 Internal Server Error Unknown database 'demo_development'

[Rails] Re: Trying to get a list of households with one person in them

2010-08-23 Thread Sandy
On Aug 23, 5:05 pm, Rob Biedenharn r...@agileconsultingllc.com wrote: On Aug 23, 2010, at 4:15 PM, Colin Law wrote: On 23 August 2010 21:03, Bob Smith bsm...@gmail.com wrote: in my models, household has_many :people and people   has_one :household household has a name field, and

[Rails] Re: Trying to make a user list from 2 fields

2010-08-23 Thread Sandy
On Aug 23, 4:06 pm, Colin Law clan...@googlemail.com wrote: On 23 August 2010 20:20, Bob Smith bsm...@gmail.com wrote: When I suggested not top posting, I suggested inserting your post in the previous post in order that it appears after the question it is answering.  Not just sticking the

Re: [Rails] Re: Trying to get a list of households with one person in them

2010-08-23 Thread Rob Biedenharn
On Aug 23, 2010, at 6:17 PM, Sandy wrote: On Aug 23, 5:05 pm, Rob Biedenharn r...@agileconsultingllc.com wrote: On Aug 23, 2010, at 4:15 PM, Colin Law wrote: On 23 August 2010 21:03, Bob Smith bsm...@gmail.com wrote: in my models, household has_many :people and people has_one :household

  1   2   >