[Rails] Re: Is Rails 2.3 a first step towards Rails 3.0...?

2009-02-02 Thread MaD
a new version of rails is always a step ahead. of course you can profit of any knowledge you gain on rails 2.3 since the most of it will still be true in rails 3. there will be new things in 3 and there will be some deprecated things, but basically it's still rails and not merb or anything else.

[Rails] Query that display the list for todays records

2009-02-02 Thread Johnroy World
hello all, How do i make a query on active records that would display the list of all records that happened on this day or lets says today's transaction records. Datetime is my data type of the field on the database. Any help / advice will be appreciated. Thank you -- Posted via

[Rails] Re: gem install ruby 0 doesn't install Ruby but says it doe

2009-02-02 Thread Raimon Fs
Shrikant Lokhande wrote: Hello Guys, It seems to need export path of ruby, rubygems Library. This is just Example How to export Path: - export GEM_HOME=/usr/local/rubygems/gems export GEM_PATH=/usr/local/rubygems/gems

[Rails] A noob question for direction

2009-02-02 Thread John Dean
Hello folks! I'm new here as you would soon see from my post. I started reading http://pine.fm/LearnToProgram/ and am somewhat getting it... I do find some difficulties understanding the flow of things, but I do get the logic. I guess it all comes with determination and practice. Well, enough

[Rails] Active Record Session expiration in Rails 2.3

2009-02-02 Thread Nauhaie None
Hi, I cannot figure out how to let session cookies expire after let's say two years. Note that I am *not* using CookieStore. I mean the cookie referencing the Active Record Session. Here is my config/environnement.rb ++ [...] Rails::Initializer.run do |config| [...]

[Rails] Maps

2009-02-02 Thread Nisha Thoprath
Please tell me how to integrate google maps in my application.I tried doing it with ym4r plugin, but the command runs and gets back to command prompt without generating the required folders. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You

[Rails] Re: ActiveRecord::AssociationTypeMismatch (User(#54754560) expected, got User(#54510280))

2009-02-02 Thread morgler
thanks for the link! it solved my problem :)! thank you so much! matthias On 2 Feb., 15:15, Frederick Cheung frederick.che...@gmail.com wrote: On 2 Feb 2009, at 13:37, morgler wrote: i keep getting this AssociationTypeMismatch error. i think this could be a bug related to ruby/rails

[Rails] Re: Active Record Session expiration in Rails 2.3

2009-02-02 Thread Peter Hickman
Session cookies are supposed to expire when you quit the browser! Ordinary cookies however are another matter entirely. I asked a similar question (how to get non session cookies to be stored in the database) a few days ago and got no answer. Best of luck.

[Rails] Re: Maps

2009-02-02 Thread Chris Johnson
I have an example app out on git hub... http://github.com/johnsonch/google_maps_and_geokit_demo/tree/master shameless plug... On Mon, Feb 2, 2009 at 8:38 AM, Robert Walker rails-mailing-l...@andreas-s.net wrote: Nisha Thoprath wrote: Please tell me how to integrate google maps in my

[Rails] Scrape rankings Google

2009-02-02 Thread Remco Swoany
Hi, i use the code to scrape google search results. require 'rubygems' require 'scrubyt' google_data = Scrubyt::Extractor.define do fetch 'http://www.google.nl/' fill_textfield 'q', 'ticket' submit link_title //a...@class='l'], :write_text = true do link_url end end p

[Rails] belongs_to / has_many does not save

2009-02-02 Thread bachm...@geo.uzh.ch
Hi I'm following pretty closely the following the Depot Application from the 'Agile Web Development with Rails' (3rd edition), but I run into deep trouble. I have: class Product ActiveRecord::Base has_many :charge_items end class Transaction ActiveRecord::Base belongs_to :user

[Rails] Re: ActiveRecord can validates select querys?

2009-02-02 Thread Harold
Can you give an example of what you mean by validate the data before passing it over to SQL? If it's SQL injection you're worried about, rails can help clean up user input, but I'm not sure that's where your heading with this... On Feb 2, 11:18 am, Daniel López

[Rails] how make deployment

2009-02-02 Thread mahmoud_cs
how i deploy my application on virtual machine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from

[Rails] Re: ActiveRecord can validates select querys?

2009-02-02 Thread Daniel López
Harold wrote: Can you give an example of what you mean by validate the data before passing it over to SQL? If it's SQL injection you're worried about, rails can help clean up user input, but I'm not sure that's where your heading with this... On Feb 2, 11:18�am, Daniel L�pez

[Rails] Re: ActiveRecord can validates select querys?

2009-02-02 Thread Harold A . Giménez Ch .
Sounds like something you can do with ActiveRecord validations: http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html for example: validates_numericality_of :some_numer validates_length_of :something_else, :in = 3..12 You can use validate_format_of :a_date (and specify

[Rails] Re: ActiveRecord can validates select querys?

2009-02-02 Thread Daniel López
Harold A. Giménez Ch. wrote: Sounds like something you can do with ActiveRecord validations: http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html for example: validates_numericality_of :some_numer validates_length_of :something_else, :in = 3..12 You can use

[Rails] Controller design for app with different user types

2009-02-02 Thread Joey Ar
Hi, I am trying to implement an application where there are different types of users (about 5-6). The privileges of each type of user varies pretty drastically and hence when each logs into the application, each will have his own home page and set of things that he can do that differs from other

[Rails] Re: ActiveRecord can validates select querys?

2009-02-02 Thread Harold A . Giménez Ch .
In that case, I don't know of a way to reuse an ActiveRecord validation before running a find. You don't even have a ActiveRecord object at that point yet. You might just have to write your custom validations before running the find. Maybe someone else has a better option. Sorry :-o) -H On Mon,

[Rails] Re: belongs_to / has_many does not save

2009-02-02 Thread Frederick Cheung
On 2 Feb 2009, at 16:44, bachm...@geo.uzh.ch wrote: Hi I'm following pretty closely the following the Depot Application from the 'Agile Web Development with Rails' (3rd edition), but I run into deep trouble. I have: Before 2.3 having an association called transaction is a bad bad idea.

[Rails] Re: ActiveRecord can validates select querys?

2009-02-02 Thread Maurício Linhares
Why do you need to validate on a find method? There should never be an invalid record at the database, that's why there is no validation in a find and for the same reason there shouldn't be. If you think you really need it, maybe you haven't really figured out what your problem is. - Maurício

[Rails] Re: ActiveRecord can validates select querys?

2009-02-02 Thread Harold A . Giménez Ch .
Completely agree with you, Mauricio. The only reason I can see the need to validate before a find is if your are absolutely obsessed with performance and you don't want to hit the DB if you know a priori that no record will be returned. This is definitely not a normal case. If the query takes too

[Rails] Create my own template language

2009-02-02 Thread Maurício Linhares
Hello guys, I am starting to think that i need a templating language (just like PHP's Smarty and JSP's Expression Language) for simple value outputs in a page without resorting to %= %. I'm working on a I18N heavy application and we have a lot of places where we open a scriptlet just to show a

[Rails] Re: Create my own template language

2009-02-02 Thread Jodi Showers
Maurico - On 2-Feb-09, at 1:34 PM, Maurício Linhares wrote: Hello guys, I am starting to think that i need a templating language (just like PHP's Smarty and JSP's Expression Language) for simple value outputs in a page without resorting to %= %. I'm working on a I18N heavy application

[Rails] link_to_remote 'this'

2009-02-02 Thread Ben
When using something like link_to_function Label, some_function(this); the 'this' references the href generated by the rails link_to_function. When using something like link_to_remote(task.id_description, {:update = {:success = div1, :failure = div2}, :url = {:action =

[Rails] Re: how make deployment

2009-02-02 Thread Daly
Mahmoud, could you provide more information on your configuration? Is the VM local to your machine? Is this for development or production purposes, etc... On Feb 2, 12:10 pm, mahmoud_cs mahmoudahmedfo...@yahoo.com wrote: how i deploy my application on virtual machine

[Rails] Re: link_to_remote 'this'

2009-02-02 Thread Daly
You should be able to do this: link_to_remote(task.id_description, {:update = {:success = div1, :failure = div2}, :url = {:action = :some_action, :id = id}, :id = id, :before = Element.show('spinner'), :complete = Element.hide('spinner'); some_function('# {id}')})

[Rails] Re: selection box update

2009-02-02 Thread Daly
Whatever you wanted to put in the link_to_function, put in the onchange of the select. Note that since you don't want to make the round trip to the server to render the partial, or update a div with the contents of the partial, whatever you want to display as a result of the user selecting

[Rails] Re: Controller design for app with different user types

2009-02-02 Thread Eric
Roles are fairly well-documented in the blogosphere, even if the roles are entirely orthogonal. Here are a few readings to get you started: http://metautonomo.us/2008/09/30/easy-role-based-authorization/ http://railsforum.com/viewtopic.php?id=1579

[Rails] Re: Freeze gems

2009-02-02 Thread Frederick Cheung
On 2 Feb 2009, at 17:59, josh_richard wrote: Hello everyone. Anyone run into this problem? I have an rails app which is running rails 2.2.2 with rubygems 1.2.0 on a dev box. Rails is frozen and in SVN. The hosting server is running gems 0.9 which appears to be incompatible with rails

[Rails] Re: A noob question for direction

2009-02-02 Thread John Dean
RailsExpert.com wrote: John, I am not sure exactly what you're asking but if you are trying to 'personalize' many separate websites based on the calling domain ( something.com ) then I might be able to help. I created a synthetic example of this at WebRancher.com where one code based reads

[Rails] Re: Elements for a related Model in a Form

2009-02-02 Thread Tomas Markauskas
I've already implemented it in a very similar way, but that looks a bit nicer. Thanks! Tomas On Feb 2, 2:57 pm, Patrick Doyle wpds...@gmail.com wrote: On Sun, Feb 1, 2009 at 6:25 AM, Tomas Markauskas i...@tamole.net wrote: Hello, I can't figure out how to do this: I have a Post Model

[Rails] Re: link_to_remote 'this'

2009-02-02 Thread Ben
Isn't that just going to pass in the value of the variable 'id'? 'this' actually references an object in the DOM and thats what I need from the function_to_remote so I can then manipulate it and other objects in relation to its position within the DOM. Thanks On 2 Feb, 19:13, Daly

[Rails] Re: Freeze gems

2009-02-02 Thread josh_richard
You probably want to fiddle with $: right at the top of environment.rb Fred Thanks Fred, This did not work. Josh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group,

[Rails] Re: Excessive Invalid Authenticity Token Errors

2009-02-02 Thread Jogger Mr
I'm on 2.2.2 and having this same issue. I don't cache formed pages. All forms on the website give these token errors after submission after the users session expires. I'm using form helpers. My key was made by scaffold and is long and complex. These forms have worked for months as they are.

[Rails] ActiveRecord Unexplainable SystemStackError - Only in WEBrick

2009-02-02 Thread MaggotChild
This SystemStackError is driving me crazy. It only takes place when testing with WEBrick - I can't reproduce it with any tests. It is caused by calling the missing id method (base.rb:2435) on my ActiveRecord class. WEBrick and my tests are running as the same user, with a `ulimit -s` of 10240.

[Rails] launch many daemons from script/xxx

2009-02-02 Thread joserwan
Hello, I try to launch many daemons from a script written in the script/repository. One daemon is launched per site (AR model Site). I want to load Rails environment just once. Each time a daemon is launched, script exits. I tried to encapsulate daemon launching in threads, but I have the same

[Rails] Re: how make deployment

2009-02-02 Thread mahmoud_cs
On Feb 2, 9:10 pm, Daly aeld...@gmail.com wrote: Mahmoud, could you provide more information on your configuration? Is the VM local to your machine? Is this for development or production purposes, etc... On Feb 2, 12:10 pm, mahmoud_cs mahmoudahmedfo...@yahoo.com wrote: how i deploy my

[Rails] Re: A noob question for direction

2009-02-02 Thread RailsExpert.com
John, I am not sure exactly what you're asking but if you are trying to 'personalize' many separate websites based on the calling domain ( something.com ) then I might be able to help. I created a synthetic example of this at WebRancher.com where one code based reads the 'request.host' object and

[Rails] Re: belongs_to :type, :class_name = ItemType

2009-02-02 Thread Ryan Bigg
If you set self.inheritance_column = nil on the model this may work. --~--~-~--~~~---~--~~ 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

[Rails] Re: Setting updated_at in database.

2009-02-02 Thread Andrew Timberlake
On Mon, Feb 2, 2009 at 12:19 PM, Tushar Gandhi rails-mailing-l...@andreas-s.net wrote: Hi, I have an 'updated_at' field in events table. Whenever I am creating an event it gets set to Time.now. But I don't want to set current time in it. But I want to set another time. How should I do

[Rails] Re: did_not_yield

2009-02-02 Thread Frederick Cheung
On 2 Feb 2009, at 13:34, Raimon Fs wrote: In my production app, when the session has expired, I'm getting always too much time without activity, and sometimes the did_not_yield ... I'm missing something here Start by not abusing the tertiary operator to write impenetrable code :-)

[Rails] Re: ActiveRecord::AssociationTypeMismatch (User(#54754560) expected, got User(#54510280))

2009-02-02 Thread Frederick Cheung
On 2 Feb 2009, at 13:37, morgler wrote: i keep getting this AssociationTypeMismatch error. i think this could be a bug related to ruby/rails when using mixins. heres a short version of my code: # user.rb require 'friend_invitation' require 'friendship' using require like this can bust

[Rails] habtm problem

2009-02-02 Thread Little Known
I have Kids and I have Sports. I have a checkbox list of Sports for each Kid. Let's say I make a Kid, and assign him to all 5 sports. It works, great. Let's say I make another Kid(Kid2), and assign him to all 5 sports. I get this error: Mysql::Error: Duplicate entry '2' for key 1: INSERT

[Rails] Re: Which command is used to list the gems used by an application?

2009-02-02 Thread Nashg Cold
I want to deploy my app and I need to install the gems I used. Which command line is used for that -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] slow performance in ruby 1.9.1

2009-02-02 Thread andreas
I'm not sure what ActiveRecord support status is for ruby 1.9.1, so I apologize if this report is premature. By the way, I'm only using ActiveRecord here, not Rails. I notice a 4x slow down in my program when I switch to 1.9.1. I've narrowed it down to this # works fine class fast

[Rails] Re: Setting updated_at in database.

2009-02-02 Thread Tushar Gandhi
MaD wrote: you can try overriding the method that is setting the updated_at attribute. take a look at this (which is the first hit google found for me on that subject): http://neeraj.name/blog/articles/800-override-automatic-timestamp-in-activerecrod-rails That seems to be not working for

[Rails] Re: Setting updated_at in database.

2009-02-02 Thread Julian Leviston
You can't without executing the sql directly, because updated at is automagic Sent from my iPhone On 02/02/2009, at 9:19 PM, Tushar Gandhi rails-mailing-l...@andreas-s.net wrote: Hi, I have an 'updated_at' field in events table. Whenever I am creating an event it gets set to

[Rails] (JOBS) RoR Mentor needed

2009-02-02 Thread ianhstewart
Hi, I am looking for someone to work with me on my first Ruby on Rails app. I have not coded since my days at NeXT, but I am looking forward to getting into it again. I want someone that will assist in some coding, but mainly be there to bounce off ideas and see if my direction is sound or if I

[Rails] Re: ActiveRecord Unexplainable SystemStackError - Only in WEBrick

2009-02-02 Thread Ryan Bigg
Why not use a search plugin like thinking sphinx to do your searching for you? On 03/02/2009, at 6:06, MaggotChild hsomob1...@yahoo.com wrote: This SystemStackError is driving me crazy. It only takes place when testing with WEBrick - I can't reproduce it with any tests. It is caused by

[Rails] Re: habtm problem

2009-02-02 Thread Freddy Andersen
I think we need to see one your kid/sport model and then the new/ create method in the controller... You should not have a id column btw in the kids_sports table.. . This should be your up task: def self.up create_table :kids_sports, :id = false do |t| t.integer :kid_id

[Rails] Re: Setting updated_at in database.

2009-02-02 Thread MaD
you can try overriding the method that is setting the updated_at attribute. take a look at this (which is the first hit google found for me on that subject): http://neeraj.name/blog/articles/800-override-automatic-timestamp-in-activerecrod-rails

[Rails] Assert_select with count 0

2009-02-02 Thread Aa Wilson
Hello, all. This is short and simple. I have this statement in a functional test: assert_select 'input' do assert_select [name=?], {:count = 0,:text =/areas\[1\]/} end This assertion gives me the following: 1) Failure: test_areas(SampleControllerTest)

[Rails] ActiveRecord can validates select querys?

2009-02-02 Thread Daniel López
I have an application that makes a render inline, and another in XML based on data from an URL. I need to validate the data before passing it over to SQL, and I would like to receive the errors in the returned array, or at least a TRUE/FALSE. As there is no associated view file I don’t know how

[Rails] did_not_yield

2009-02-02 Thread Raimon Fs
Hello, I have some rudimentary code for loging into my app and database, it works ok (I think) but in Production, it does some strange things. I've reduce the problem to a more simplest approach, without rendering, simply creating a variable of what should do. Here is what I get in the log:

[Rails] Re: Freeze gems

2009-02-02 Thread josh_richard
Fred, I followed this link since it was close to what was needed. I added the ENV variables to the rails project with no success. http://www.rubygems.org/read/chapter/15#page101 There are may examples on the net about how to freeze gems, but I am not finding any documentation about how to

[Rails] Re: Rubyforge downloads gone?

2009-02-02 Thread Thomas R. Koll
Hi, You can download it from github: http://github.com/rails/rails/tree/v2.1.0 ciao, tom On Feb 2, 1:08 pm, safestate safest...@gmail.com wrote: the rubyforge zips of the older Rails versions are gone, in fact all the downloads are gone? i need the rails 2.1.0 zip file for my spree project

[Rails] Re: select_time starts with 00:00

2009-02-02 Thread rails and rails only
rails and rails only wrote: hi, I want to make my select_time starts with 00:00. how can we use this helper. please help me. thanks in advance jk sorry not select_time i want time_select. -- Posted via http://www.ruby-forum.com/.

[Rails] how-to click javascript button - and debug noob questions

2009-02-02 Thread Darin Ginther
Source: a href=javascript:document.__main.__cmdfunc.value='launchPage()';document.__main.submit(); class=buttonimg src=images/start-my-page.jpg//a Contains a href to a javascript function, has an image as a clickable element. I'm trying to trigger the click by an image reference:

[Rails] ActionWeb Service not working

2009-02-02 Thread Jeba Momin
Hi... I'm using Actionwebservice::Struct to pass complex elements to my webservice calls... I've installed the actionwebservice gem and made changes in environment.rb as told at http://fiatdev.com/2007/05/31/making-actionwebservice-work-with-edge-rails .. But at i get an error at server startup

[Rails] Re: Elements for a related Model in a Form

2009-02-02 Thread Patrick Doyle
On Sun, Feb 1, 2009 at 6:25 AM, Tomas Markauskas i...@tamole.net wrote: Hello, I can't figure out how to do this: I have a Post Model and it :has_and_belongs_to_many :tags. When I edit a Post, I want to create checkboxes or a select field (with multiple select choices), so I can add tags

[Rails] Re: ActiveRecord Unexplainable SystemStackError - Only in WEBrick

2009-02-02 Thread MaggotChild
On Feb 2, 1:33 pm, Ryan Bigg radarliste...@gmail.com wrote: Why not use a search plugin like thinking sphinx to do your searching for you? Overkill. The searching is rudimentary so I just quickly created something. In any case, I take it you had no thoughts as to why I'm receiving the stack

[Rails] Re: A noob question for direction

2009-02-02 Thread Julian Leviston
The best way to learn is to have a real problem you want solved. Then try, fail and ask questions when you're stuck. Sent from my iPhone On 02/02/2009, at 8:10 PM, John Dean rails-mailing-l...@andreas- s.net wrote: Hello folks! I'm new here as you would soon see from my post. I started

[Rails] looking for help with NoMethodError: undefined method `key?' for #String:0x4795488

2009-02-02 Thread Chris
Hi all, Any help with this would be appreciated. I'm using instant rails, updated to 2.2.2, on Windows XP. I've created my DB and scaffolded a few things and put some fixtures into place, and when I run the tests I get many errors that look like this: - 1)

[Rails] select_time starts with 00:00

2009-02-02 Thread rails and rails only
hi, I want to make my select_time starts with 00:00. how can we use this helper. please help me. thanks in advance jk -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: Which command is used to list the gems used by an application?

2009-02-02 Thread Andrew Timberlake
On Mon, Feb 2, 2009 at 2:20 PM, Nashg Cold rails-mailing-l...@andreas-s.net wrote: I want to deploy my app and I need to install the gems I used. Which command line is used for that -- Posted via http://www.ruby-forum.com/. gem install list of gem names -- Andrew Timberlake

[Rails] rake db:migrate should run for all environements

2009-02-02 Thread Fernando Perez
Or at least development and test. How many times did I find myself banging my head on the table with buggy tests until I figured out that I had forgotten to migrate the test database. Why rake db:migrate doesn't by default migrate all environments at the same time? -- Posted via

[Rails] Re: to_json conflict with json gem and rails 2.1

2009-02-02 Thread matthias
same problem here, any solution yet? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group,

[Rails] Freeze gems

2009-02-02 Thread josh_richard
Hello everyone. Anyone run into this problem? I have an rails app which is running rails 2.2.2 with rubygems 1.2.0 on a dev box. Rails is frozen and in SVN. The hosting server is running gems 0.9 which appears to be incompatible with rails 2.x. Is there a way to freeze rubygems (aka, gem)

[Rails] Re: A noob question for direction

2009-02-02 Thread Andrew Timberlake
On Mon, Feb 2, 2009 at 11:10 AM, John Dean rails-mailing-l...@andreas-s.net wrote: Hello folks! I'm new here as you would soon see from my post. I started reading http://pine.fm/LearnToProgram/ and am somewhat getting it... I do find some difficulties understanding the flow of things, but

[Rails] Re: Active Record Session expiration in Rails 2.3

2009-02-02 Thread Nauhaie None
Oh, I found the reason :session_expires has been replaced by :expire_after. This now works: ActionController::Base.session_options[:expire_after]=2.years -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: belongs_to :type, :class_name = ItemType

2009-02-02 Thread Rasmus Nielsen
Julian Leviston wrote: It's bad practice to have an association or method called type because ruby already defines One IMHO Sent from my iPhone On 02/02/2009, at 6:48 PM, Rasmus Nielsen rails-mailing-l...@andreas-s.net I agree - but I'll use it anyway because of the following reasons:

[Rails] Logging stuff

2009-02-02 Thread aa aa
Say I wanted to log all successful and failed saves to a special log table. But I also wanted to save the logged in user and some other session stuff. I assume I would have some sort of module included into the controllers, which would then do something with the methods of the objects being

[Rails] Re: ActiveRecord Unexplainable SystemStackError - Only in WEBrick

2009-02-02 Thread Frederick Cheung
On 2 Feb 2009, at 22:39, MaggotChild wrote: On Feb 2, 1:33 pm, Ryan Bigg radarliste...@gmail.com wrote: Why not use a search plugin like thinking sphinx to do your searching for you? Overkill. The searching is rudimentary so I just quickly created something. In any case, I take it you

[Rails] Setting updated_at in database.

2009-02-02 Thread Tushar Gandhi
Hi, I have an 'updated_at' field in events table. Whenever I am creating an event it gets set to Time.now. But I don't want to set current time in it. But I want to set another time. How should I do that? I tried like this:- event.updated_at=2008-02-02 03:35:11. event.save Still it not

[Rails] Re: Suggestions for a rails webhost...

2009-02-02 Thread Peter De Berdt
On 02 Feb 2009, at 14:05, tonypm wrote: Some helpful comments here. Does anyone have any experience using these from the UK. As far as I know Slicehost doesn't host VPSs in the UK. We recently migrated our US-based Rimuhosting server accounts to a new server in their UK datacenter

[Rails] selection box update

2009-02-02 Thread Tarscher
Hi all, Depending on the selection in a selection box I need to render a partial. I want to do this without calling the server. I think I need to use link_to_function. The problem is that I dont see how to implement this for a selection box. I also what to trigger the partial rendering

[Rails] Re: gem install ruby 0 doesn't install Ruby but says it doe

2009-02-02 Thread lokhande.shrik...@gmail.com
Yes, There is relation between that. Please do only: export GEM_HOME=/usr/local/lib/ruby/gems/1.8 and try again, so that will export another path's. Thanks- Shrii On Feb 2, 1:59 pm, Raimon Fs rails-mailing-l...@andreas-s.net wrote: Shrikant Lokhande wrote: Hello Guys, It seems to need

[Rails] Re: gem install ruby 0 doesn't install Ruby but says it doe

2009-02-02 Thread lokhande.shrik...@gmail.com
Or, Refer - http://www.debian-administration.org/articles/329 Thanks- Shrii On Feb 2, 2:37 pm, lokhande.shrik...@gmail.com lokhande.shrik...@gmail.com wrote: Yes, There is relation between that. Please do only: export

[Rails] Rubyforge downloads gone?

2009-02-02 Thread safestate
the rubyforge zips of the older Rails versions are gone, in fact all the downloads are gone? i need the rails 2.1.0 zip file for my spree project --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: belongs_to :type, :class_name = ItemType

2009-02-02 Thread Julian Leviston
It's bad practice to have an association or method called type because ruby already defines One IMHO Sent from my iPhone On 02/02/2009, at 6:48 PM, Rasmus Nielsen rails-mailing-l...@andreas-s.net wrote: Wouter de Bie wrote: Rasmus Nielsen wrote: Yes I know - but why doesn't

[Rails] Re: Maps

2009-02-02 Thread Robert Walker
Nisha Thoprath wrote: Please tell me how to integrate google maps in my application.I tried doing it with ym4r plugin, but the command runs and gets back to command prompt without generating the required folders. There is good documentation on Google's web site that explains how to use their

[Rails] Re: Query that display the list for todays records

2009-02-02 Thread Andrew Timberlake
On Mon, Feb 2, 2009 at 10:37 AM, Johnroy World rails-mailing-l...@andreas-s.net wrote: hello all, How do i make a query on active records that would display the list of all records that happened on this day or lets says today's transaction records. Datetime is my data type of the field

[Rails] ActiveRecord::AssociationTypeMismatch (User(#54754560) expected, got User(#54510280))

2009-02-02 Thread morgler
i keep getting this AssociationTypeMismatch error. i think this could be a bug related to ruby/rails when using mixins. heres a short version of my code: # user.rb require 'friend_invitation' require 'friendship' class User ActiveRecord::Base include FriendInvitationUser, FriendshipUser

[Rails] Rails startup error in segments.rb

2009-02-02 Thread Alex Sokoloff
= Booting WEBrick... /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.2.2/lib/ action_controller/routing/segments.rb:6: warning: encoding option is ignored - N = Rails 2.2.2 application started on http://0.0.0.0:3000 = Ctrl-C to shutdown server; call with --help for options [2009-02-02 12:03:54]

[Rails] Re: looking for help with NoMethodError: undefined method `key?' for #String:0x4795488

2009-02-02 Thread Frederick Cheung
On 2 Feb 2009, at 03:47, Chris wrote: Hi all, Any help with this would be appreciated. I'm using instant rails, updated to 2.2.2, on Windows XP. I've created my DB and scaffolded a few things and put some fixtures into place, and when I run the tests I get many errors that look like

[Rails] Ruby on Rails Day @ JAX India 2009 Conference

2009-02-02 Thread Jax Jax
This year at the JAX India 2009 conference, sda-india.com promises to stage some JAX India Specials that have never been thought of before. Introducing for the very first time at JAX India 2009 is JAX University Day and Ruby on Rails Day. Ruby on Rails Day at the JAX India 2009 conference would

[Rails] Re: Active Record Session expiration in Rails 2.3

2009-02-02 Thread Nauhaie None
Hi, Thank you for your answer! However, I am sure it is possible to make these session cookies stay! The option exists, and it always worked for me until 2.3! I know ActiveRecord Session Store has been refactored in this version (at least renamed), and I am sure this is merely a question of

[Rails] AssociationTypeMismatch got Fixnum

2009-02-02 Thread An
I'm using rails 2.0.5 and mongrel. I have a Page and a Source models. class Source ActiveRecord::Base has_many :pages end class Page ActiveRecord::Base belongs_to :source end Basically I'm listing pages with their sources; In production and development ( I use mongrel_cluster in the

[Rails] Query help

2009-02-02 Thread Newb Newb
Hi.. Any ways to optimise this conditions using ternery operator if params[:userinfo] if params[:userinfo][:company_id] == nil or params[:userinfo][:company_id] == Select Company company_id = nil else company_id = params[:userinfo][:company_id] end if

[Rails] Re: Query help

2009-02-02 Thread Thomas R. Koll
Hi, The question should be Why is this bad code? The answer for your question is that it append the company_id to the conditions there is a company_id. ciao, tom On Feb 2, 7:38 am, Newb Newb rails-mailing-l...@andreas-s.net wrote: hi.. what does the below code ? conditions company_id =

[Rails] Re: did_not_yield

2009-02-02 Thread Raimon Fs
Frederick Cheung wrote: On 2 Feb 2009, at 13:34, Raimon Fs wrote: In my production app, when the session has expired, I'm getting always too much time without activity, and sometimes the did_not_yield ... I'm missing something here Start by not abusing the tertiary operator to write

[Rails] Re: Logging stuff

2009-02-02 Thread Ryan Bigg
Use acts_as_audited. On 03/02/2009, at 8:53 AM, aa aa wrote: Say I wanted to log all successful and failed saves to a special log table. But I also wanted to save the logged in user and some other session stuff. I assume I would have some sort of module included into the

[Rails] Re: Logging stuff

2009-02-02 Thread Philip Hallstrom
Say I wanted to log all successful and failed saves to a special log table. But I also wanted to save the logged in user and some other session stuff. I assume I would have some sort of module included into the controllers, which would then do something with the methods of the objects

[Rails] Re: gem install ruby 0 doesn't install Ruby but says it doe

2009-02-02 Thread Raimon Fs
ok, thanks ... I'm going to re-install again Leny and start again ... :-) regards, r. -- 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

[Rails] Re: AssociationTypeMismatch got Fixnum

2009-02-02 Thread An
Randomly means that usually the page load without errors, but somethimes the same page throws the error above. Refreshing the page fixes the problem. On 2 Feb, 12:11, MaD mayer.domi...@gmail.com wrote: what exaclty means randomly? does it happen in different places? is your own code

[Rails] Re: Suggestions for a rails webhost...

2009-02-02 Thread tonypm
Some helpful comments here. Does anyone have any experience using these from the UK. Tonypm --~--~-~--~~~---~--~~ 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: simple_autocomplete and find: same inputs but diff order

2009-02-02 Thread Thomas R. Koll
Hi, could you post the relevant code where you change the behaviour of the find and :order ? cioa, tom On Feb 2, 2:27 am, Arthur Chan rails-mailing-l...@andreas-s.net wrote: However, I modified the :order parameters of the find function in the plugin so that San Francisco, US will always

[Rails] Re: AssociationTypeMismatch got Fixnum

2009-02-02 Thread MaD
what exaclty means randomly? does it happen in different places? is your own code mentioned in the trace? wich call would fail? it seems your code is expection an instance of Source but is getting a number (maybe the id) instead. in order to find the piece of code that is causing the error, you

[Rails] Re: A noob question for direction

2009-02-02 Thread John Dean
Julian Leviston wrote: The best way to learn is to have a real problem you want solved. Then try, fail and ask questions when you're stuck. Sent from my iPhone On 02/02/2009, at 8:10 PM, John Dean rails-mailing-l...@andreas- OK I do have a real project in mind. It's pretty simple for an

[Rails] How do I make an API for my rails app?

2009-02-02 Thread Tony Tony
Hi all, I'm currently close to releasing my first rails app. Many thanks to the countless people that have helped me with my questions on this forum. Couldn't have done it without you. So being close to release I started thinking of neat things I could do, like making an iphone app. I haven't

  1   2   >