[Rails] Re: Javascript tooltips in rails?

2008-10-24 Thread Prathiba Danthanarayana
hi all, can someone give any idea to improve the look and feel in tool tips. i used javascript to get done this. but it does not look nice. i need to have more look and feel on this. cheers, prathiba. Nathaniel Brown wrote: > Just actually came across something just like this, based on the do

[Rails] Re: Soap4R

2008-10-24 Thread Karthi kn
I found out the reason for that error. Bu default, the soap classes in "/ruby/lib/ruby/1.8" folder are used but not the classes inside the soap4r gem. When I deleted the soap, wsdl and xsd folders inside '1.8' folder, I got the error resolved. -- Posted via http://www.ruby-forum.com/. --~--~

[Rails] Railscast 75, Observe_field and Shopping Cart

2008-10-24 Thread Vinay
Hi all, I have the shopping cart page where a user can add items dynamically through ajax as explained in Railscast episode 75. I am using observe_field to observe the 'quantity' and 'cost' fields to update the total field for each item. This does not work however, for records that are added thro

[Rails] How does rails decide which template file (rjs vs html) to use?

2008-10-24 Thread GreenValley
Hello, My application sometimes renders js.rjs template for an action and other times it tries to render html.erb template. Since, I do not have an html.erb template for the action, I get an error. I am trying to figure out how rails decides to use rjs vs html template so that I can solve the i

[Rails] WEBrick server problem

2008-10-24 Thread Dureza Diaz
hi there good day!! I am having problem with my WEBrick server i am using RoR for the past 2 yrs. and it is the 1st time I encountered this problem.. When I start my WeBrick server it just keep on starting progress it never started.. my gem -v 1.1.1 rails -v 1.2.6 and ruby -v 1.8.5 (2007-09-24 pat

[Rails] MissingSourceFile/no such file to load -- scrubyt

2008-10-24 Thread Vinay Gowda
Hi, I am rails beginner. i have installed srubyt successfully. But the problem is when i run the code it gives an error. MissingSourceFile in TestController#index no such file to load -- scrubyt RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace C:/InstantRai

[Rails] Re: has_many relationship able to be placed on one to others?

2008-10-24 Thread Michael Kahle
Bed time again. Strange how hyper-focused I can be at night. I've been working off of a post to get me going on understanding how to implement in Rails these polymorphic associations. http://railsforum.com/viewtopic.php?id=5882 I also found this: http://www.pathf.com/blogs/2008/07/drying-up-ra

[Rails] Re: Javascript tooltips in rails?

2008-10-24 Thread [EMAIL PROTECTED]
try this solution: http://www.seesaw.it/en/toolbox/widgets/ On Oct 24, 9:19 am, Prathiba Danthanarayana wrote: > hi all, > can someone give any idea to improve the look and feel in tool tips. i > used javascript to get done this. but it does not look nice. i need to > have more look and feel on

[Rails] Ruby on Rails project in Bay Area

2008-10-24 Thread Niranjan
We are looking for a consultant for a long term project. Please respond ASAP, if interested. 2+ years experience creating web applications using Ruby on Rails 5+ years software development experience 2+ years of RDBMS experience (Postgres) Java Script experience JavaScript toolkits (Dojo, Prototy

[Rails] Re: Strange saving problem

2008-10-24 Thread shagymoe
> Is new_document.id a typo?   Yes, sorry. > The fact that you're getting the object_id does mean that > the object is not a model instance. That's what I don't understand. The database is assigning and id and returning it to rails. Rails is then trying to use this id to create the new_document

[Rails] Re: UTF-8 compliance in Rails

2008-10-24 Thread Frederick Cheung
On Oct 24, 7:33 am, kiranH <[EMAIL PROTECTED]> wrote: > I have a issue with UTF-8 compliance... Any solutions? You're going to have to give more details than that. Fred --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

[Rails] Re: page.select when element has multiple classes

2008-10-24 Thread Frederick Cheung
On Oct 23, 8:02 pm, Garrett Berneche <[EMAIL PROTECTED]> wrote: > I am trying to collapse a section of the table.  I have a css class > "showing" that just denotes that a row needs to be hidden in exactly > this situation.  In my RJS file I am trying to use the following code, > but it doesn't

[Rails] Re: interacting select_tags using onchange

2008-10-24 Thread Luma
You're right, the problem was just :with => "select_number" Using :with => "'value='+value" works. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send

[Rails] Re: tiny mce - different options for different actions in same controller?

2008-10-24 Thread Kieran P
Hello Howard, I currently maintain the plugin at http://github.com/kete/tiny_mce (which looking at the version number appears to be the one you're using). If thats the one you use, then what you want to do isn't currently possible via the controller. http://github.com/kete/tiny_mce/tree/master/l

[Rails] Re: Strange saving problem

2008-10-24 Thread none
MRJ is right: leave the id handling to rails. but that goes for both Page and Document. document = Document.new(:attribute => 'value') # set all attributes except :id, :project_id, :created_at, :updated_at project.documents << document page = Page.new(:attribute => 'value') # same thing here doc

[Rails] Re: Migration error

2008-10-24 Thread Frederick Cheung
On Oct 23, 7:12 pm, KoBrAKai <[EMAIL PROTECTED]> wrote: > Hi all > > I'm getting an error when running rake db:migrate :- > > rake aborted! > uninitialized constant PKG_NAME > > I'm not sure what PKG_NAME is refering to, has anyone else had this > same issue or does anyone have an idea what coul

[Rails] Re: PostgreSQL datatypes equivalent when scaffolding

2008-10-24 Thread Fernando Perez
Migrations in Rails are independent from your DB. I have successfully migrated a Rails app from MySQL to PostgreSQL without having to change a single line of migration. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message bec

[Rails] tiny mce - different options for different actions in same controller?

2008-10-24 Thread hading
Hi, I'm using the current TinyMCE plugin for rails (V. 3.2.0.2-1). I want to know if there is a way to use different options for the editor in a single controller depending on the action invoked. I've tried re- invoking the uses_tiny_mce declaration in the individual actions, e.g. def my_action

[Rails] HTML from view into controller

2008-10-24 Thread GA Gorter
How can i get the html code create by a view into the controller I need to save the html created into a view into a file something like File.open( 'index.html', 'w' ){|file| file.write (The_view)} -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] Uberkit checkbox

2008-10-24 Thread atmorell
Hello, I can't figure out how to create a checkbox with uberkit :/ http://github.com/mbleigh/uberkit/tree/master Does anyone have an idea? There is not much to get from the documentation. I am trying to create a simple checkbox like this: f.check_box("eula", "accepted", { :class => 'eula_check

[Rails] Re: HTML from view into controller

2008-10-24 Thread Borja Martín
You can try the render_to_string method: http://api.rubyonrails.com/classes/ActionController/Base.html#M000475 Regards GA Gorter escribió: > How can i get the html code create by a view into the controller > > I need to save the html created into a view into a file > something like > > File.op

[Rails] installing msql 5.0 into instant rials - InnoDB error

2008-10-24 Thread Adam Akhtar
Hi Im using a book based on 1.2* ruby and rather than using instal rails to install all req. software it asks the user to do everthing individually. Well i already had instant rails working fine so thought id stick to it. The book wanted msql 5 to be installed and then select various options i.e.

[Rails] Re: installing msql 5.0 into instant rials - InnoDB error

2008-10-24 Thread Adam Akhtar
Sorry I made a mistake that should have read a book based on rails 1.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, s

[Rails] has_many :through, with condition

2008-10-24 Thread Lars Christensen
I have this simple model with orders and products. Orders looks like this: class Order < ActiveRecord::Base has_many :orders_products, :foreign_key => :order_id has_many :products, :through => :orders_products has_many :priority_products, :through => :orders_products, :source => :product, :

[Rails] Re: Best approach for importing data from a file

2008-10-24 Thread RichardOnRails
Hi All, I've thought more about this and think I know how to proceed with a Rails-integrated approach. Thanks anyway if you've looked at the original post. Best wishes, Richard On Oct 23, 10:23 pm, RichardOnRails <[EMAIL PROTECTED]> wrote: > Hi All, > > I've got a basic Rails app started.  One

[Rails] Re: Best approach for importing data from a file

2008-10-24 Thread RichardOnRails
Thanks, Craig. That search suggestion does help. Best wishes, Richard On Oct 24, 12:15 am, "Craig Demyanovich" <[EMAIL PROTECTED]> wrote: > A Google search for > > rails import csv > > returns several promising results. > > Regards, > Craig --~--~-~--~~~---~--~~

[Rails] Re: Strange saving problem

2008-10-24 Thread shagymoe
The models actually look like this: (notice the "has_one :page") class Project < ActiveRecord::Base   has_many :documents end class Document < ActiveRecord::Base   has_one :page   belongs_to :project end class Page < ActiveRecord::Base   belongs_to :document end Interestingly, your suggestions

[Rails] Re: tiny mce - different options for different actions in same controller?

2008-10-24 Thread hading
Thank you, that will be helpful. Howard --~--~-~--~~~---~--~~ 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 gr

[Rails] Re: has_many :through, with condition

2008-10-24 Thread Frederick Cheung
On Oct 24, 12:36 pm, Lars Christensen <[EMAIL PROTECTED]> wrote: > I have this simple model with orders and products. Orders looks like > this: > > class Order < ActiveRecord::Base >   has_many :orders_products, :foreign_key => :order_id >   has_many :products, :through => :orders_products >   h

[Rails] Re: installing msql 5.0 into instant rials - InnoDB error

2008-10-24 Thread Frederick Cheung
On Oct 24, 12:07 pm, Adam Akhtar <[EMAIL PROTECTED]> wrote: > Hi Im using a book based on 1.2* ruby and rather than using instal rails > to install all req. software it asks the user to do everthing > individually. Well i already had instant rails working fine so thought > id stick to it. The bo

[Rails] Re: PostgreSQL datatypes equivalent when scaffolding

2008-10-24 Thread The Neurochild
On Oct 25, 4:33 am, Fernando Perez <[EMAIL PROTECTED]> wrote: > Migrations in Rails are independent from your DB. I have successfully > migrated a Rails app from MySQL to PostgreSQL without having to change a > single line of migration. > -- > Posted viahttp://www.ruby-forum.com/. And what about

[Rails] Re: page.select when element has multiple classes

2008-10-24 Thread Garrett Berneche
How do I figure that out? On Oct 24, 5:48 am, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On Oct 23, 8:02 pm, Garrett Berneche <[EMAIL PROTECTED]> > wrote: > > > I am trying to collapse a section of the table.  I have a css class > > "showing" that just denotes that a row needs to be hidden in

[Rails] Re: encrypt password on the browser

2008-10-24 Thread Andrius Chamentauskas
What about asymmetric encryption algorithms? You could use javascript to encrypt password using public key, and then this information could only be decrypted only by using private key, which could be stored safely in server and used in model for authentication or registration. I think example of t

[Rails] Re: How to pass parameters to after_update callback?

2008-10-24 Thread Andrius Chamentauskas
How about making two read-write attributes, one for changes and one for files, in Ticket model. They would be automatically assigned from params hash (yes you can assign any attribute using params hash, not only database related fields) and you could use them in after update method. On Oct 23, 3:

[Rails] Re: Using SMS gateway to receive Text messages for a RoR app.

2008-10-24 Thread Bharat
There are two sources that I am familiar with: 1. Peepcode PDF doc: http://peepcode.com/products/mms2r-pdf 2. A book published by Packt Publishing: Ruby on Rails Web Mashup Projects [eBook] (9781847193940) They are both decent references. Hope this helps. Bharat On Oct 23, 6:48 am, Yung-Rick <

[Rails] Re: installing msql 5.0 into instant rials - InnoDB error

2008-10-24 Thread Adam Akhtar
> Sounds like your version of mysql was compiled without support for > innodb. > > Fred hmm i am using a version that came with the book - its version 5 though. Ill try downloading it direct from the msql website. Why does mysql work fine when i install the same version outside of the IR dire

[Rails] Re: Soap4R

2008-10-24 Thread Craig Demyanovich
It's risky to just delete the classes, since you're altering your install of Ruby. There must be a way to ensure that the classes from the gem are used that preserves your Ruby installation. Craig --~--~-~--~~~---~--~~ You received this message because you are subs

[Rails] Re: HABTM on 3 tables

2008-10-24 Thread Panda Beer
just an information to be more clear: I had yet created a table called "articles_tags_users" in the database. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] HABTM on 3 tables

2008-10-24 Thread Panda Beer
Hi. Currently, I had 2 models linked with HABTM association: _Article_ and _Tag_ class Article < ActiveRecord::Base has_and_belongs_to_many :tags end class Tag < ActiveRecord::Base has_and_belongs_to_many :articles end But I believe I need to ad another model called _User_. Do you know how

[Rails] Re: Using SMS gateway to receive Text messages for a RoR app.

2008-10-24 Thread gaveeno
Yung-Rick, One option is to register your own shortcode, but this is super pricey (prob around $1500 to $2000 per month plus setup costs). Another option (this is what I use) is to receive messages on a shared shortcode through an SMS gateway. The way this works is the SMS gateway owns shortcod

[Rails] Re: page.select when element has multiple classes

2008-10-24 Thread Shandy Nantz
Garrett Berneche wrote: > How do I figure that out? > > On Oct 24, 5:48�am, Frederick Cheung <[EMAIL PROTECTED]> You should be able to see it if you look at the source of the page. You might also check your logs to see if any kind of error is being thrown. -- Posted via http://www.ruby-forum.c

[Rails] Conversion of ' to ' in text in rails.

2008-10-24 Thread kiranH
I have noticed ', ';,   doesnt get converted in normal test display in a view file. how to get them converted back and get a valid html text displayed? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] Re: HABTM on 3 tables

2008-10-24 Thread Jochen Kaechelin
Am 24.10.2008 um 16:23 schrieb Panda Beer: > > just an information to be more clear: > I had yet created a table called "articles_tags_users" in the > database. I think you are looking for something like this: http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids -- Jochen -

[Rails] third-level domain

2008-10-24 Thread Petr Bobek
Hi, I am wondering if there is chance to automatically create third-level domain. For example: new user registration, with rockguru nickname, and I would like to create a third-level domain for this user: rockguru.mydomain.com. Anyone knows how to do it? Is it possible? Thanks in advance. Petr

[Rails] Sort an Array of ActiveRecords objects by created_at

2008-10-24 Thread Bensoussan Michael
Hi, I have an array of activerecords objects. I'd like to sort it by created_at column (they all have one). Do you see a smart way to do it ?? Thanks, Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on R

[Rails] Re: Syncing offline data to Rails app

2008-10-24 Thread shenry
Any ideas? On Oct 23, 4:58 pm, shenry <[EMAIL PROTECTED]> wrote: > I'm wondering how to go about setting up an app to allow data > collectionofflinethat is latersync'd to the master db... > > I picture the data collection being done on a PDA or something similar > and then docked and uploaded to

[Rails] Re: Sort an Array of ActiveRecords objects by created_at

2008-10-24 Thread Thorsten Müller
what's wrong with: @my_model = Model.find(:all, :order => "created_at ASC")) --~--~-~--~~~---~--~~ 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@googleg

[Rails] Re: page.select when element has multiple classes

2008-10-24 Thread Frederick Cheung
On 24 Oct 2008, at 09:22, Garrett Berneche wrote: > > How do I figure that out? > Firebug can show you that (in the bit where you see responses to requests). I can't remember if the magic proxy object that comes back from page.select allows you to do visual_effect. You may just have to cal

[Rails] Re: third-level domain

2008-10-24 Thread Frederick Cheung
On 24 Oct 2008, at 15:41, Petr Bobek wrote: > > Hi, > > I am wondering if there is chance to automatically create third-level > domain. For example: new user registration, with rockguru nickname, > and > I would like to create a third-level domain for this user: > rockguru.mydomain.com. > This

[Rails] Re: Sort an Array of ActiveRecords objects by created_at

2008-10-24 Thread Bensoussan Michael
My array is composed by different activerecord objects: my_model1 = Model.find(:all) my_model2 = Model.find(:all) @my_models = my_model1 + mymodel2 and now i'd like to sort @my_models by "created_at" On Oct 24, 4:54 pm, Thorsten Müller <[EMAIL PROTECTED]> wrote: > what's wrong with: > > @my_m

[Rails] Re: Modifying a class method's state

2008-10-24 Thread Nick
On Oct 23, 1:30 pm, "Kazim Zaidi" <[EMAIL PROTECTED]> wrote: > Hi Nick, > This is because Ruby constants are not constants. They can change. > Ruby warns you when you reinitialize a constant, but not otherwise. > That is, > Constant << "anything" > won't produce a warning. > > You should use somet

[Rails] Re: installing msql 5.0 into instant rials - InnoDB error

2008-10-24 Thread Frederick Cheung
On 24 Oct 2008, at 14:56, Adam Akhtar wrote: > > >> Sounds like your version of mysql was compiled without support for >> innodb. >> >> Fred > > hmm i am using a version that came with the book - its version 5 > though. > Ill try downloading it direct from the msql website. Why does mysql >

[Rails] Re: Passing more than one parameters to redirect_to

2008-10-24 Thread Mark Reginald James
Selva Raj wrote: > Hi, > > I am getting some error which I am clue less. I try to pass more than > one parameter with redirect_to, For example, > > My params are... > search => {"name"=>"", "bus_group"=>"1", "region"=>"", "unapproved"=>"", > "tech_owner"=>""} > > And I try to give. > > redirec

[Rails] Re: Sort an Array of ActiveRecords objects by created_at

2008-10-24 Thread Bensoussan Michael
Yes that's it ! ! Thank you, Mike. On Oct 24, 5:10 pm, "Craig Demyanovich" <[EMAIL PROTECTED]> wrote: > On Fri, Oct 24, 2008 at 10:59 AM, Bensoussan Michael <[EMAIL PROTECTED]>wrote: > > > > > My array is composed by different activerecord objects: > > > my_model1 = Model.find(:all) > > > my_mo

[Rails] Re: Sort an Array of ActiveRecords objects by created_at

2008-10-24 Thread Maurício Linhares
Even simpler: my_model1 = Model.find(:all) my_model2 = Model.find(:all) @my_models = (my_model1 + mymodel2).sort_by( &:created_at ) On Fri, Oct 24, 2008 at 12:12 PM, Bensoussan Michael <[EMAIL PROTECTED]> wrote: > > Yes that's it ! ! > > Thank you, > Mike. -- Maurício Linhares http://alinha

[Rails] Re: InstantRails and SQLite

2008-10-24 Thread CiriusMex
I know it's a PHP app. The point is that I wan't to integrate it to a RoR application I workin' on and as I use InstantRails to develop I just wan't to integrate FluxBB directly as an InstantRails www app (so I don't have to install several times PHP, Apache and so on as they come with InstantRail

[Rails] Re: Sort an Array of ActiveRecords objects by created_at

2008-10-24 Thread Craig Demyanovich
On Fri, Oct 24, 2008 at 10:59 AM, Bensoussan Michael <[EMAIL PROTECTED]>wrote: > > My array is composed by different activerecord objects: > > my_model1 = Model.find(:all) > > my_model2 = Model.find(:all) > > @my_models = my_model1 + mymodel2 > > and now i'd like to sort @my_models by "created_at"

[Rails] Re: Sort an Array of ActiveRecords objects by created_at

2008-10-24 Thread Bensoussan Michael
Thanks Maurício, On Oct 24, 5:15 pm, "Maurício Linhares" <[EMAIL PROTECTED]> wrote: > Even simpler: > > my_model1 = Model.find(:all) > my_model2 = Model.find(:all) > > @my_models = (my_model1 + mymodel2).sort_by( &:created_at ) > What the '&' do precisely ? > On Fri, Oct 24, 2008 at 12:12 PM, B

[Rails] Re: Strange saving problem

2008-10-24 Thread Mark Reginald James
shagymoe wrote: > The models actually look like this: (notice the "has_one :page") > > class Project < ActiveRecord::Base > has_many :documents > end > > class Document < ActiveRecord::Base > has_one :page > belongs_to :project > end > > class Page < ActiveRecord::Base > belongs_to :doc

[Rails] Re: Syncing offline data to Rails app

2008-10-24 Thread Daniel Moore
You could write a small ruby app that reads the data and then posts to you site through HTTP. On Oct 24, 7:44 am, shenry <[EMAIL PROTECTED]> wrote: > Any ideas? > > On Oct 23, 4:58 pm, shenry <[EMAIL PROTECTED]> wrote: > > > I'm wondering how to go about setting up an app to allow data > > collec

[Rails] Re: HABTM on 3 tables

2008-10-24 Thread Mark Reginald James
Panda Beer wrote: > Hi. Currently, I had 2 models linked with HABTM association: _Article_ > and _Tag_ > > class Article < ActiveRecord::Base > has_and_belongs_to_many :tags > end > > class Tag < ActiveRecord::Base > has_and_belongs_to_many :articles > end > > But I believe I need to ad ano

[Rails] Re: Sort an Array of ActiveRecords objects by created_at

2008-10-24 Thread Bensoussan Michael
excellent ! Thanks for the tip. Mike On Oct 24, 5:31 pm, "Maurício Linhares" <[EMAIL PROTECTED]> wrote: > Hi Michael, > > The &:created_at is just a shorthand for &Proc.new { |i| i.created_at } > > > > On Fri, Oct 24, 2008 at 12:18 PM, Bensoussan Michael <[EMAIL PROTECTED]> > wrote: > > > Thank

[Rails] Re: Sort an Array of ActiveRecords objects by created_at

2008-10-24 Thread Maurício Linhares
Hi Michael, The &:created_at is just a shorthand for &Proc.new { |i| i.created_at } On Fri, Oct 24, 2008 at 12:18 PM, Bensoussan Michael <[EMAIL PROTECTED]> wrote: > > Thanks Maurício, > > On Oct 24, 5:15 pm, "Maurício Linhares" <[EMAIL PROTECTED]> > wrote: >> Even simpler: >> >> my_model1 = Mod

[Rails] Re: third-level domain

2008-10-24 Thread Petr Bobek
Frederick Cheung wrote: > On 24 Oct 2008, at 15:41, Petr Bobek wrote: > > This is more a question for your network/sysadminy person, but you can > create dns wildcars, ie *.mydomain.com all pointing at your production > server. > > Fred Thank you, for your replay. So, it means that, there is no

[Rails] AJAXy Timeline (e.g. election.twitter.com)

2008-10-24 Thread Donnie
I'm using the Prototype helper "periodically_call_remote" to add a new item to a list similar to how http://election.twitter.com works. My question is, how do I make it so that periodically_call_remote will only add items that it hasn't already added? The remote action is querying the database fo

[Rails] Re: Strange saving problem

2008-10-24 Thread none
^^ exactly! On 24 Okt., 17:21, Mark Reginald James <[EMAIL PROTECTED]> wrote: > shagymoe wrote: > > The models actually look like this: (notice the "has_one :page") > > > class Project < ActiveRecord::Base > > has_many :documents > > end > > > class Document < ActiveRecord::Base > > has_one :

[Rails] DRYing/shortening form processing

2008-10-24 Thread Nick
So I have this form with >10 fields on it. When the form is submitted, the corresponding controller action calls the class method #filtered_properties to process the data. I've created separate class methods for processing each parameter, which #filtered_properties calls. However, #filtered_prope

[Rails] Re: Sort an Array of ActiveRecords objects by created_at

2008-10-24 Thread Bensoussan Michael
excellent ! Thanks for the tip. Mike On Oct 24, 5:31 pm, "Maurício Linhares" <[EMAIL PROTECTED]> wrote: > Hi Michael, > > The &:created_at is just a shorthand for &Proc.new { |i| i.created_at } > > > > On Fri, Oct 24, 2008 at 12:18 PM, Bensoussan Michael <[EMAIL PROTECTED]> > wrote: > > > Thank

[Rails] rescue_from and assert_raise

2008-10-24 Thread Michael Irwin
Since commit 5e3517ea7b9fbd460f772bffc9212d882011f2bc, rescue_from is now being handled in tests. I've been using rescue_from to handle custom exceptions and testing that those exceptions are raised in functional tests with assert_raise. This no longer works now. What's the proper way to test t

[Rails] Re: encrypt password on the browser

2008-10-24 Thread Aaron Turner
On Fri, Oct 24, 2008 at 6:45 AM, Andrius Chamentauskas <[EMAIL PROTECTED]> wrote: > > What about asymmetric encryption algorithms? You could use javascript > to encrypt password using public key, and then this information could > only be decrypted only by using private key, which could be stored >

[Rails] Re: AJAXy Timeline (e.g. election.twitter.com)

2008-10-24 Thread Hassan Schroeder
On Fri, Oct 24, 2008 at 8:45 AM, Donnie <[EMAIL PROTECTED]> wrote: > My question is, how do I make it so that periodically_call_remote will > only add items that it hasn't already added? The remote action is > querying the database for new records, but it pulls all records that > have been create

[Rails] Re: page.select when element has multiple classes

2008-10-24 Thread Garrett Berneche
Wow, I am lost on this one. I installed Firebug, seems kinda awesome. Wish I had done this before. I don't know what you mean about seeing responses to requests though, and I still can't find any js that looks relevant. I am not getting any errors in my logs, and I see no js at all in my sourc

[Rails] Re: page.select when element has multiple classes

2008-10-24 Thread Garrett Berneche
Wow, I am lost on this one. I installed Firebug, seems kinda awesome. Wish I had done this before. I don't know what you mean about seeing responses to requests though, and I still can't find any js that looks relevant. I am not getting any errors in my logs, and I see no js at all in my sourc

[Rails] Rails problem

2008-10-24 Thread Gi Ga
What wrong? # gem install rails -s http://gems.rubyonrails.org -v 2.2.0 Successfully installed activesupport-2.2.0 Successfully installed activerecord-2.2.0 Successfully installed actionpack-2.2.0 Successfully installed actionmailer-2.2.0 Successfully installed activeresource-2.2.0 Successfully i

[Rails] Wrong number of arguments (2 of 0)

2008-10-24 Thread Thierry Delbart
I'm new with RoR. I have a simple migration file: class CreateClubs < ActiveRecord::Migration def self.up create_table :clubs do |t| t.columns :name, :string t.columns :ref, :string t.columns :description, :string t.columns :local, :string t.timestamps en

[Rails] Re: Wrong number of arguments (2 of 0)

2008-10-24 Thread Thierry Delbart
Juste before trying to migrate thie table clubs, I did it fine with league: class CreateLeagues < ActiveRecord::Migration def self.up create_table :leagues do |t| t.columns :name, :string t.columns :ref, :string t.columns :description, :string t.columns :category, :

[Rails] Re: version_fu in Rails 2.1.1

2008-10-24 Thread tansaku
Turns out I was missing a version column in my statistic_types table ... Duh On Oct 21, 10:53 am, tansaku <[EMAIL PROTECTED]> wrote: > Thanks, but no, have that in there already: > > class StatisticType < ActiveRecord::Base > has_many :statistic_summaries > version_fu > end > > On Oct 21

[Rails] Re: page.select when element has multiple classes

2008-10-24 Thread Garrett Berneche
try { $$(".showing").each(function(value, index) { value.visualEffect("blind_up"); }); On Oct 24, 12:24 pm, Garrett Berneche <[EMAIL PROTECTED]> wrote: > Wow, I am lost on this one. > > I installed Firebug, seems kinda awesome.  Wish I had done this > before.  I don't know what you mean abo

[Rails] Re: page.select when element has multiple classes

2008-10-24 Thread Garrett Berneche
try { $$(".showing").each(function(value, index) { value.visualEffect("blind_up"); }); On Oct 24, 10:57 am, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On 24 Oct 2008, at 09:22, Garrett Berneche wrote: > > > > > How do I figure that out? > > Firebug can show you that (in the bit where you

[Rails] Re: third-level domain

2008-10-24 Thread Matt Harrison
Frederick Cheung wrote: > > On 24 Oct 2008, at 15:41, Petr Bobek wrote: > >> Hi, >> >> I am wondering if there is chance to automatically create third-level >> domain. For example: new user registration, with rockguru nickname, >> and >> I would like to create a third-level domain for this use

[Rails] Re: page.select when element has multiple classes

2008-10-24 Thread Garrett Berneche
try { $$(".showing").each(function(value, index) { value.visualEffect("blind_up"); }); On Oct 24, 12:24 pm, Garrett Berneche <[EMAIL PROTECTED]> wrote: > Wow, I am lost on this one. > > I installed Firebug, seems kinda awesome.  Wish I had done this > before.  I don't know what you mean abo

[Rails] Re: DRYing/shortening form processing

2008-10-24 Thread Maurício Linhares
Hi Nick, I can't imagine a reason why these methods are class and not instance methods, could you please explain a litle bit more about your idea, your model and your controller and what do you really want with these filter_property methods? On Fri, Oct 24, 2008 at 12:52 PM, Nick <[EMAIL PROTECT

[Rails] Re: HABTM on 3 tables

2008-10-24 Thread Panda Beer
Jochen Kaechelin wrote: > I think you are looking for something like this: > http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids I think this solution is a little bit so specific and so complexe for my association need. I hope there is a more simple way include by defaut in Acti

[Rails] Re: Strange saving problem

2008-10-24 Thread shagymoe
Well, that works, but I'm still getting errors under heavy load and randomly under light load. --~--~-~--~~~---~--~~ 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 rubyonra

[Rails] Re: Wrong number of arguments (2 of 0)

2008-10-24 Thread Philip Hallstrom
On Oct 24, 2008, at 9:40 AM, Thierry Delbart wrote: > > Juste before trying to migrate thie table clubs, I did it fine with > league: > > class CreateLeagues < ActiveRecord::Migration > def self.up >create_table :leagues do |t| > t.columns :name, :string > t.columns :ref, :string

[Rails] Re: page.select when element has multiple classes

2008-10-24 Thread Garrett Berneche
My whole js.rjs looks like this; page.select('.showing').each do |row| row.visual_effect :blind_up end page.replace "types_table", :partial => "assembly_types/types_table", :locals => { :assembly_types => @assembly_types } for property in @properties do page["property_#{h property.name}

[Rails] Re: Problem running back-to-back migrations

2008-10-24 Thread Pardee, Roy
Agree that scaffolding in 2.x is unnecessarily hobbled. FWIW--here's what I wound up doing: http://helloimbloggingatyounow.blogspot.com/2008/03/i-am-leet-rails-haxor.html or if that breaks: http://is.gd/4IRI It's worked reasonably well for me. -Original Message- From: rubyonrails-ta

[Rails] Re: third-level domain

2008-10-24 Thread Frederick Cheung
On Oct 24, 4:40 pm, Petr Bobek <[EMAIL PROTECTED]> wrote: > Frederick Cheung wrote: > > On 24 Oct 2008, at 15:41, Petr Bobek wrote: > > > This is more a question for your network/sysadminy person, but you can > > create dns wildcars, ie *.mydomain.com all pointing at your production that should

[Rails] User editable webpages

2008-10-24 Thread Shandy Nantz
I have to build this webpage where the user can select the color, add a picture, overall make the layout the way that they want. Can anyone point me to a tutorial and give me some suggestions on how to get started on this, I am unsure how to proceed. Thanks, -S -- Posted via http://www.ruby-foru

[Rails] Re: page.select when element has multiple classes

2008-10-24 Thread Garrett Berneche
I think I have a handle on my problem now, but I don't know how to fix it. A user clicks one of several "show" buttons to expand a section of the table. The js.rjs file blinds_up whatever is showing, redraws the whole table (to get the new rows we want to expand, with style="display:none") and t

[Rails] Re: Rails problem

2008-10-24 Thread Rick
you need to call rails with a project name: $ rails --help Usage: /opt/local/bin/rails /path/to/your/app [options] Options: -r, --ruby=path Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path). Defau

[Rails] Re: page.select when element has multiple classes

2008-10-24 Thread Frederick Cheung
On Oct 24, 7:07 pm, Garrett Berneche <[EMAIL PROTECTED]> wrote: > I think I have a handle on my problem now, but I don't know how to fix > it. > > A user clicks one of several "show" buttons to expand a section of the > table.  The js.rjs file blinds_up whatever is showing, redraws the > whole t

[Rails] how to get root path with link_to ?

2008-10-24 Thread guillaume
Hi, I would like to get the root path of my website using link_to in a view... (for example : http://www.mywebsite/controller/action/id) how is that possible ? (i do need it, because i use the generated code in the view outside of the rails app') Thanks.. --~--~-~--~~~-

[Rails] Re: Sort an Array of ActiveRecords objects by created_at

2008-10-24 Thread Frederick Cheung
On Oct 24, 4:31 pm, "Maurício Linhares" <[EMAIL PROTECTED]> wrote: > Hi Michael, > > The &:created_at is just a shorthand for &Proc.new { |i| i.created_at } > Although it should be noted that this (also known as Symbol#to_proc) is a lot slower than just writing the equivalent block (but not in r

[Rails] Newbie question

2008-10-24 Thread The Neurochild
Hi. I have a simple question. Looks like it's something basic. I have 2 elements: a form with a textfield and a link (father), and a panel with a link that includes a value inside (child). Here's how my analogy works: - First you click on the link of the "father" to make the "child" appear (wit

[Rails] Newbie question: Transferring values to a text field

2008-10-24 Thread The Neurochild
Hi. I have a simple question. Looks like it's something basic. I have 2 elements: a form with a textfield and a link (father), and a panel with a link that includes a value inside (child). Here's how my analogy works: - First you click on the link of the "father" to make the "child" appear (wit

[Rails] Re: DRYing/shortening form processing

2008-10-24 Thread Nick
On Oct 24, 1:02 pm, "Maurício Linhares" <[EMAIL PROTECTED]> wrote: > Hi Nick, > > I can't imagine a reason why these methods are class and not instance > methods, could you please explain a litle bit more about your idea, > your model and your controller and what do you really want with these > fi

[Rails] Re: ActionWebService

2008-10-24 Thread akbet
May be that will usefully for some body. For start correct work, I changed: class XmlrpcController < ApplicationController to class XmlrpcController < ActionController::Base --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

[Rails] Re: DRYing/shortening form processing

2008-10-24 Thread Maurício Linhares
Well, instead of doing it using class methods , you could do it using this -> http://github.com/staugaard/active_record_base_without_table/tree/master You get all active record validations, active record error handling and instead of doing it in an ugly class method that looks like a "function" y

[Rails] Troubleshooting Long Requests

2008-10-24 Thread emarthinsen
Hello- I'm using Scout to monitor a Rails app of mine. What I'm noticing is that all of the pages in the site take a fraction of a second to complete. This is totally acceptable. However, occasionally I'll have a request that takes 189 seconds to complete. It's very consistent. A request takes a

  1   2   >