[Rails] Re: From : Newb! {ADVICE_NEEDED}

2009-02-02 Thread MaD
i almost forgot two things. first here is the url: http://mephistoblog.com/ second: you might wanna choose a better topic next time you got a problem. "I'm a n00b and need help" doesn't say anything about what your problem is about and many people probably won't even read those posts. --~--~-

[Rails] Re: From : Newb! {ADVICE_NEEDED}

2009-02-02 Thread MaD
afaik you can't do that with blogger.com. but creating your own blog shouldn't be that hard. look at mephisto for a full featured RoR-based blogging-app. or just start from scratch. it's not THAT much work. --~--~-~--~~~---~--~~ You received this message because yo

[Rails] jQuery and rails events

2009-02-02 Thread sa 125
I read DHH's post on using various js libraries with rails, and thought I'd give it a try with jQuery (http://loudthinking.com/posts/32). What I have is a page composed of various partials, and I'm trying to invoke jQuery to render a different partial when something is clicked on. What I can't f

[Rails] Re: Query some part on each record.

2009-02-02 Thread MaD
i don't wann disappoint, but i think you'll have to query the whole entry "very long contents" and cut off the tail. GetsomePart.Big_Row[0..3] if anyone knows a better solution (one that offers more performance), let me know. --~--~-~--~~~---~--~~ You received t

[Rails] From : Newb! {ADVICE_NEEDED}

2009-02-02 Thread Genocide Law
Hi, I'm new on Ruby. Practically started a week ago and right now I'm wondering whether or not I can use ruby to design my web page on blogger.com? If not, I think the only alternative left would be designing a web page myself on rails, which, I don't quite wanna do that cz it's going to take "awh

[Rails] Query some part on each record.

2009-02-02 Thread Ukrit Himakoon
I would like to ask you this question suppose that I've 1 record which contains very long contents like Big_Row_Table - Row1|Big_Row| - Row1|very long contents I would like to query only some part of Big row (such as get first 4 characters )of this row by running query c

[Rails] Re: Help on File

2009-02-02 Thread MaD
put the file in your 'public'-folder of your rails app or make it accessible by other means (= webserver). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send emai

[Rails] Re: Help on File

2009-02-02 Thread Newb Newb
Julian Leviston wrote: > What do you want it to do? What is the path supposed to load? > > Blog: http://random8.zenunit.com/ > Learn rails: http://sensei.zenunit.com/ > > On 03/02/2009, at 5:37 PM, Newb Newb http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You r

[Rails] Re: Help on File

2009-02-02 Thread Julian Leviston
What do you want it to do? What is the path supposed to load? Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 03/02/2009, at 5:37 PM, Newb Newb wrote: > > Hello... > > when i use below code to open a google page it works. > > onClick="window.open('http:// > www.g

[Rails] Re: check box issue

2009-02-02 Thread Julian Leviston
Nope. Perhaps someone else will. Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 03/02/2009, at 5:16 PM, Bobby Vijay wrote: > > Julian Leviston wrote: >> Use a session or url encode on the observer >> >> Blog: http://random8.zenunit.com/ >> Learn rails: http://sens

[Rails] Help on File

2009-02-02 Thread Newb Newb
Hello... when i use below code to open a google page it works. http://www.google.com','mywindow','width=400,height=200')"> But i have html file in my application folder.to open that file i tried this Code. http://192.168.0.82:3000/ACMServer_exe/ChatHistory/2009-01-11/parthi...@angleritech.com~

[Rails] Re: check box issue

2009-02-02 Thread Bobby Vijay
> can u plz tel me in detail. thank u Attachments: http://www.ruby-forum.com/attachment/3246/_add_new_facility.html.erb -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

[Rails] Re: check box issue

2009-02-02 Thread Bobby Vijay
Julian Leviston wrote: > Use a session or url encode on the observer > > Blog: http://random8.zenunit.com/ > Learn rails: http://sensei.zenunit.com/ > > On 03/02/2009, at 4:18 PM, Bobby Vijay http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this mes

[Rails] Re: check box issue

2009-02-02 Thread Bobby Vijay
Bobby Vijay wrote: > Code: html > <%= check_box "other_facility", "others" %> Other Facilities > <%= observe_field(:other_facility_others, > :update => :other_facility, > :url => { :action => :others}) %> > I have used this code... i'm getting

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

2009-02-02 Thread Julian Leviston
Really? Maybe updates? Maybe it's a game that has a 3d client for it? ;) lots Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 03/02/2009, at 3:56 PM, Mukund wrote: > > What does your Rails application do that other developers will be > interested in? If you ha

[Rails] Re: check box issue

2009-02-02 Thread Julian Leviston
Use a session or url encode on the observer Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 03/02/2009, at 4:18 PM, Bobby Vijay wrote: > > Code: html > <%= check_box "other_facility", "others" %> Other Facilities > <%= observe_field(:other_facility_others, >

[Rails] check box issue

2009-02-02 Thread Bobby Vijay
Code: html <%= check_box "other_facility", "others" %> Other Facilities <%= observe_field(:other_facility_others, :update => :other_facility, :url => { :action => :others}) %> I have used this code... i'm getting the action correctly but still

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

2009-02-02 Thread Mukund
What does your Rails application do that other developers will be interested in? If you have some neat functionality that you want others to use as a library, then release it as a gem. If your entire application does something wonderful, put in a SOAP or REST interface to it so it can be host

[Rails] Re: simple_autocomplete and find: same inputs but diff order

2009-02-02 Thread Arthur Chan
More info for the problem: The plugins runs fine in development mode but production mode only! Thanks, Arthur -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rail

[Rails] Re: Is It Possible to use auto complete with text_field _tag.

2009-02-02 Thread Newb Newb
Julian Leviston wrote: > Use google to find it. Search for autocomplete rails > > Sent from my iPhone > > On 03/02/2009, at 2:03 PM, Newb Newb http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

[Rails] Re: Is It Possible to use auto complete with text_field _tag.

2009-02-02 Thread Julian Leviston
Use google to find it. Search for autocomplete rails Sent from my iPhone On 03/02/2009, at 2:03 PM, Newb Newb wrote: > > Julian Leviston wrote: >> Yes. What else would you use it for? >> >> Sent from my iPhone >> >> On 31/01/2009, at 4:49 PM, Newb Newb > > Thanks for the Reply. > if i can use

[Rails] Re: Is It Possible to use auto complete with text_field _tag.

2009-02-02 Thread Newb Newb
Julian Leviston wrote: > Yes. What else would you use it for? > > Sent from my iPhone > > On 31/01/2009, at 4:49 PM, Newb Newb Thank You. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] Re: Is It Possible to use auto complete with text_field _tag.

2009-02-02 Thread Julian Leviston
Yes. What else would you use it for? Sent from my iPhone On 31/01/2009, at 4:49 PM, Newb Newb wrote: > > hi > Is it possible to use auto complete with text_field _tag. > Kindly let me know > > Cheers > -- > Posted via http://www.ruby-forum.com/. > > > --~--~-~--~~~---

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

2009-02-02 Thread Chris Warren
Thanks! Turned out not to be indenting, but that was the clue I needed to take a closer look at my fixture syntax. I'd accidentally removed the space after the : in name value pairs in one of my files. I hadn't realized how format sensitive yaml is. Now on to the fun stuff... -Chris On Mon, Fe

[Rails] Re: (JOBS) RoR Mentor needed

2009-02-02 Thread Julian Leviston
Where r u? Sent from my iPhone On 03/02/2009, at 8:19 AM, ianhstewart wrote: > > 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

[Rails] Re: simple_autocomplete and find: same inputs but diff order

2009-02-02 Thread Arthur Chan
Thomas r. Koll wrote: > Hi, > > could you post the relevant code where you change the behaviour of > the find and :order ? > > cioa, tom > Hi Tom, I modified the autocomplete_for function in autocomplete.rb # arthur: override the find_order options find_options = {

[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 tr

[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 object

[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 > contr

[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 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 though

[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 manipu

[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 http://www.ruby-

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

2009-02-02 Thread MaggotChild
On Feb 2, 1:33 pm, Ryan Bigg 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 error -other than possi

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

2009-02-02 Thread Darin Ginther
Source: 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: ie.button(:src, /start-my-page/).click but I exit and get a "1" return code. Questions: 1) What is the correct means to click this image? 2) Is there a

[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 free

[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) [c:/ruby/lib/ruby/gem

[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 t.int

[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 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 calling the "mis

[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] 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 INTO

[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: how make deployment

2009-02-02 Thread mahmoud_cs
On Feb 2, 9:10 pm, Daly 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 wrote: > > > how i deploy my application on virtual machine the v

[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 sa

[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] 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. I

[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 gr

[Rails] Re: Query help

2009-02-02 Thread Phlip
Newb Newb wrote: > 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" As the first of a great many minor issues with this code, you can DRY it by

[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 wrote: > You

[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 wrote: > On Sun, Feb 1, 2009 at 6:25 AM, Tomas Markauskas wrote: > > > Hello, > > > I can't figure out how to do this: > > > I have a Post Model and it :has_and_belongs

[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 r

[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 ra

[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 http://www.vaporbase.com/postings/Authorization_i

[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 somethi

[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_functio

[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] 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) int

[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 wrote: > how i deploy my application on virtual machine --~--~-~--~~~---~--~~

[Rails] Re: Create my own template language

2009-02-02 Thread Maurício Linhares
Liquid doesn't accept the scriptlet ( <%= %> ) syntax, but thanks anyway. - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Mon, Feb 2, 2009 at 3:56 PM, Jodi Showers wrote: > > Maurico - > > On 2-Feb-09, at 1:34 PM, Maurício Linhares wrote: > >>

[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: 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 appl

[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: 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] 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 Li

[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

[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] 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 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 > > Yo

[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 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�pe

[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 th

[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 wrote: > I have an applicatio

[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 has_ma

[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 to

[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] 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 immediate

[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 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 -- Thomas R. "To

[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 google

[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] 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 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 when using mixins. her

[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 op

[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 the

[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 recei

[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 c

[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 cod

[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 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 to a Pos

[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 (Blue

[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] 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: 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 rubyonrai

[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 params[:userinfo][

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

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 l

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

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) Er

[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] 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 < ActiveRecord

[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] 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 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 -- Andrew Timberlake http://ramblingsonrails.com http://www.linkedin.

[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 "R

[Rails] Re: AssociationTypeMismatch got Fixnum

2009-02-02 Thread Frederick Cheung
On 2 Feb 2009, at 10:49, An wrote: > > The fact that scares me *a lot* is that I get it on random basis and > reloading the page solves it. > It looks like that sometimes the record isn't retrieved correctly from > the db but instead it got a fixnum. > > > The fact that is a random behaviour doe

[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" g

[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

  1   2   >