[Rails] Doubt in submit_to_remote?

2009-08-10 Thread karthik k
hi i have one page where i have check boxes , when i select one check box and click the below %= submit_to_remote 'activate', 'Activate', :url = {:action = 'search_activate'} % below is my check box %= check_box_tag agency[agencys_id][] , agency.id% it is not even going to controller in the

[Rails] Re: Princely Plugin: get nil.size error

2009-08-10 Thread Brijesh Shah
Hi Unfortunately I don't remember it. I just remember that I applied a patch in one of the file of gem. Apply below patch in var/lib/gems/1.8/gems/htmldoc-0.2.0/lib/htmldoc.rb file. @result[:output] = result result.split(\n).each do |line| + line.strip! (patch) case line when /^BYTES:

[Rails] Re: how to get id of other table

2009-08-10 Thread Mukund
Don't do @cfacs=Fac.all (:joins=:conts, :select=facs.*,facs_conts.*,conts.*) If you need only the conts.id along with any other data that you need, do @cfacs = Fac.all(:include = :conts, :select= conts.id, facs.*) You don't need to specify the join as the relationship takes care of it. On Aug

[Rails] Re: Doubt in submit_to_remote?

2009-08-10 Thread nirosh
hi you didnt pass the checkedbox value with the remote call take a look at the locals usage of the submit_to_remote hope this helps you nirosh On Aug 10, 11:53 am, karthik k cse.k.kart...@gmail.com wrote: hi i have one page where i have check boxes , when i select one check box and click

[Rails] Re: Doubt in submit_to_remote?

2009-08-10 Thread karthik k
On Mon, Aug 10, 2009 at 12:36 PM, nirosh kunalan.kand...@gmail.com wrote: hi you didnt pass the checkedbox value with the remote call take a look at the locals usage of the submit_to_remote hope this helps you nirosh Hi nirosh Thank you is there any links to read about this Thanks --

[Rails] rake db:create

2009-08-10 Thread Gabriel Policiuc
Hey, I cannot run the db:create command. However it doesn't give any errors if I run it with the -S tag. What does the -S mean? .. it seems to skip since no database is created. if I run it without the -S I get a segmentation fault error [BUG] here : at mysql_adapter.rb line 203. Thanks, Gabi

[Rails] Re: Call AR belongs_to association accessor ID method on object assignment

2009-08-10 Thread Frederick Cheung
On Aug 10, 4:40 am, Andrew France andrew+li...@avito.co.uk wrote: Hi, Haven't been able to find this raised before but I'm sure it must have been. When assigning an object to a belongs_to association I would like it to call the *association*_id= method instead of directly updating the

[Rails] Re: Speeding up ActiveRecord Querying on very large joins?

2009-08-10 Thread Timothy N. Tsvetkov
One more vote for PostgreSQL (indexes for sorting (Index Scan Backward instead sorting all data in mysql), better usage of indexes, composite indexes and etc). Also one vote for using EXPLAIN Also one vote for using pastie.org %) And to avoid a lot of joins i use de-normalization.

[Rails] Re: Div is shown only from the layout nowhere else

2009-08-10 Thread Ram
An instance variable @x survives only for one HTTP request. When you move from the store controller to some other controller, most likely, you're sending another HTTP request (as opposed to an AJAX request, typically) which clears out all instance variables. This clears out @cart and you dont see

[Rails] Re: calling a jQuery function from RJS/onclick

2009-08-10 Thread Ram
enter live(). implementing this function solved my problem. http://docs.jquery.com/Events/live#typefn On Aug 10, 9:47 am, Ram yourstruly.vi...@gmail.com wrote: anyone?? anything? On Aug 7, 4:36 pm, Ram yourstruly.vi...@gmail.com wrote: Hi, I have the followingjQueryfunction on the head

[Rails] Re: how to get id of other table

2009-08-10 Thread wasim akram
thankyou Mukund i got it and it works On Mon, Aug 10, 2009 at 12:33 PM, Mukund marut...@yahoo.com wrote: Don't do @cfacs=Fac.all (:joins=:conts, :select=facs.*,facs_conts.*,conts.*) If you need only the conts.id along with any other data that you need, do @cfacs = Fac.all(:include =

[Rails] how to pass a checkbox list values to controller

2009-08-10 Thread Kart
hi all, can anybody say me how to pass a checkbox list values to controller using submit_remote_toand how to use the same thing in controller --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] how to delete record from two table

2009-08-10 Thread Wap Addon
hello all, i got error following when i try to delete record from services table. i am display data from tables services and users so that it make services_users logical table so that how to possible delete record from that table. ActiveRecord::StatementInvalid in ServicesController#destroy

[Rails] query

2009-08-10 Thread Hunt Hunt
Hi friends, I have two table.. 1) - users - id(pri) | user_name | email| -- 2) --- posts

[Rails] paging in ror

2009-08-10 Thread Wap Addon
hello all, any one known how to do paging in ror -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Scaffolding w/ existing DB Tables

2009-08-10 Thread Tom Chen
I am sure many people have asked this already... But I could not find anything helpful. I am trying to use RoR with an existing database with tables already defined. I used script/generate scaffold account But when I point to localhost:3000/account, no table columns showed up. The new account

[Rails] Re: xml-containing models

2009-08-10 Thread Josh White
I have been working with a project which has a similar sort of issue where there are too many possible sorts of observations a doctor can make on a scan to create fields for them all. One means of solving this was to create a 'ObservationType' an ObservationData and ObservationTypeData (join)

[Rails] Re: xml-containing models

2009-08-10 Thread Frederick Cheung
On Aug 9, 11:55 pm, Simon Macneall macne...@gmail.com wrote: The other option (and I doubt it is supported in Rails yet) is Oracle's,   XML support. It is limited, but allows you to do finds by xpath. We've   used it for a JEE project, and it can make this sort of thing a bit more  

[Rails] Re: Redirect after login

2009-08-10 Thread Dan Sinclair
Dan Sinclair wrote: Sijo Kg wrote: Hi There you have to use and return as I said earlier.. Please read2.2.13 Avoiding Double Render Errors from http://guides.rubyonrails.org/layouts_and_rendering.html Sijo It still doesn't work!! It says that it's

[Rails] Re: Scaffolding w/ existing DB Tables

2009-08-10 Thread Rails List
With scaffolding you can specify the list of fields and its data type. Try again this way... ruby script/generate scaffold Account field1:datatype field2:datatype let me know if it works. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You

[Rails] Re: paging in ror

2009-08-10 Thread Rails List
Wap Addon wrote: hello all, any one known how to do paging in ror there is a wonderful plugin called will_paginate. Installation is simple, 1. copy the plugin to your plugin folder. 2. use - require will_paginate in your environment.rb start using it in your view like this view: -

[Rails] Re: query

2009-08-10 Thread Hunt Hunt
Frederick Cheung wrote: On Aug 10, 10:27�am, Hunt Hunt rails-mailing-l...@andreas-s.net wrote: in controller I wrote logic for submit this form so that, all the title body gets added into database. But, the foreign key is not being added. How am i suppose to do? Well in an ideal

[Rails] Re: how to delete record from two table

2009-08-10 Thread Sijo Kg
Hi If what I understood from your description right, you have to check :dependent = :destroy Assuming your relationship is has_many :through you can do like in model Service like has_many :services_users, :dependent = :destroy has_many :users, :through = :services_users similary in

[Rails] Re: paging in ror

2009-08-10 Thread Wap Addon
Rails List wrote: Wap Addon wrote: hello all, any one known how to do paging in ror there is a wonderful plugin called will_paginate. Installation is simple, 1. copy the plugin to your plugin folder. 2. use - require will_paginate in your environment.rb start using it in your

[Rails] Re: paging in ror

2009-08-10 Thread Sijo Kg
Hi please read the example usage here at home http://github.com/mislav/will_paginate/tree/master Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails:

[Rails] Using Haml with Edge Rails

2009-08-10 Thread Juanma Cervera
Hello Does anyone know if Haml is usable in Edge Rails (V 3.0 PRE)? As soon as I installed the plugin, I have errors in some ERB templates, even before writing my first haml template. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received

[Rails] Re: query

2009-08-10 Thread Frederick Cheung
On Aug 10, 12:26 pm, Hunt Hunt rails-mailing-l...@andreas-s.net wrote: Frederick Cheung wrote: I think I need to use session for that. I am very new to Rails and web technology. can anybody refer me a good documentation on session in rails? and how can i avail it? You could start by

[Rails] Re: Controller in subfolder help

2009-08-10 Thread Sijo Kg
Hi Kostas Lps Read this thread http://www.ruby-forum.com/topic/192938 Sijo -- 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

[Rails] Rails: Flush HTML head

2009-08-10 Thread Arthur Chan
Hi Guys, What command I should use to flush html head to client in my layout.rhtml? I've tried $stdout.flush but weird, the CSS total time seems to be longer after using the flush. Thanks! Arthur -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] Re: Deploying Rails book

2009-08-10 Thread Eddy Josafat
It doesn't talk about mod_passenger, but is an excellent book for deploying using mongrel (alone or in cluster configuration) and it has many good tips. On Aug 9, 9:46 pm, Paulo J. Matos pocma...@gmail.com wrote: Hi all, With the fast changing rails, it is always hard to know how up to date

[Rails] how (and where) is implemented validation errors in forms

2009-08-10 Thread nico itkin
Hello everybody ! I'm building up an application which export ads to partners; So I've a hbtm association between the 2 models ad and partner; on the view side, the ad form contains several checkboxes (one per partner). Well the validation of an ad depends on which partner is linked to it. So

[Rails] Re: A copy of XX has been removed from the module tree but i

2009-08-10 Thread Roger Pack
A copy of Tracker has been removed from the module tree but is still active! After this happens, I have to reboot my development server before it will respond again. Any ideas how or why this is happening? Appears that it can occur when a plugin [which isn't reloaded] keeps a

[Rails] Relationships on a non ID field

2009-08-10 Thread Pete Moran
Hi Guys, I am a total newbie to rails - so please go easy :) So I have 2 models Country and City - the Country Model will have a 'name' and a 'code' field (so a record would be ID name code 1 United Kingdom UK Then my City table would look something

[Rails] Re: how to delete record from two table

2009-08-10 Thread Wap Addon
Sijo Kg wrote: Hi If what I understood from your description right, you have to check :dependent = :destroy Assuming your relationship is has_many :through you can do like in model Service like has_many :services_users, :dependent = :destroy has_many :users, :through =

[Rails] Re: how to delete record from two table

2009-08-10 Thread Frederick Cheung
On Aug 10, 1:44 pm, Wap Addon rails-mailing-l...@andreas-s.net wrote: uninitialized constant Service::ServicesUser i got this error as per your suggestion i want to delete only from services table record not in users Do you have a ServicesUser join model between services and users ? From

[Rails] Re: Relationships on a non ID field

2009-08-10 Thread Frederick Cheung
On Aug 10, 1:35 pm, Pete Moran rails-mailing-l...@andreas-s.net wrote: Hi Guys, I am a total newbie to rails - so please go easy :) So I have 2 models Country and City - the Country Model will have a 'name' and a 'code' field (so a record would be ID         name                  code

[Rails] Re: Rails: Flush HTML head

2009-08-10 Thread Frederick Cheung
On Aug 10, 1:00 pm, Arthur Chan rails-mailing-l...@andreas-s.net wrote: Hi Guys, What command I should use to flush html head to client in my layout.rhtml? I've tried $stdout.flush but weird, the CSS total time seems to be longer after using the flush. Given that on a normal rails app

[Rails] Re: Relationships on a non ID field

2009-08-10 Thread Robert Walker
Pete Moran wrote: So I have 2 models Country and City - the Country Model will have a 'name' and a 'code' field (so a record would be ID name code 1 United Kingdom UK Then my City table would look something like IDcountry_code

[Rails] Re: how to delete record from two table

2009-08-10 Thread Wap Addon
Frederick Cheung wrote: On Aug 10, 1:44�pm, Wap Addon rails-mailing-l...@andreas-s.net wrote: uninitialized constant Service::ServicesUser i got this error as per your suggestion i want to delete only from services table record not in users Do you have a ServicesUser join model between

[Rails] Re: Problem with javascript_include_tag with :cache

2009-08-10 Thread Mickael Faivre-Macon
bump ! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from

[Rails] Re: ruby include in the plugin 'init' works only in console mode

2009-08-10 Thread Ilan Berci
Krishna wrote: That however does not work.. and while debugging I find that any call inside the Thing instance methods (rails development mode) returns a method not found..However the same works when I use the script/ console.. Is there some rails quirk here? The include inside the

[Rails] Re: active record multiple table inheritance with abstract parent

2009-08-10 Thread boblu
anyboby any ideas? On 8月10日, 午前9:27, boblu bobl...@gmail.com wrote: Thanks a lot for your reply. I just tried your suggestion, but I did not get luck. This is the console output: Jp::Property.first TypeError: can't dup NilClass         from

[Rails] ruby include in the plugin 'init' works only in console mode

2009-08-10 Thread Krishna
Hi, I have a plugin. in which there is a module. In the init of the plugin I have a statement like #ActiveRecord::Base.send (:include, Module::Plugin) Thing.send (:include, Module::Plugin) #Thing is a model That however does not work.. and while debugging I find that any call inside the

[Rails] Re: how (and where) is implemented validation errors in forms

2009-08-10 Thread Ilan Berci
nico itkin wrote: I can't get information by myself when i need to understand rails inside mechanisms, if one of you can provide me some links which describe how rails is built, it would be really nice !! Thanks Nico Nico, This isn't an inside mechanism. You can write your own

[Rails] Re: active record multiple table inheritance with abstract parent

2009-08-10 Thread Ilan Berci
boblu wrote: anyboby any ideas? self.class.name() doesn't work in the super? -- 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

[Rails] Re: Rails 2.3 Upgrade Issue with MemCache

2009-08-10 Thread Aaron Gibralter
I was having the same problem. I use NotRemoteRunner in dev mode and StarlingRunner in production right now. I found that putting the following code in development.rb solved my problem: config.after_initialize do Workling::Remote.dispatcher = Workling::Remote::Runners::NotRemoteRunner.new

[Rails] Re: ruby include in the plugin 'init' works only in console mode

2009-08-10 Thread Frederick Cheung
On Aug 10, 2:08 pm, Krishna krishna.vi...@gmail.com wrote: That however does not work.. and while debugging I find that any call inside the Thing instance methods (rails development mode) returns a method not found..However the same works when I use the script/ console.. Is there some

[Rails] Re: calendardateselect + observe_form ?

2009-08-10 Thread Aldric Giacomoni
Because it's Javascript making a change, I need to make it refresh regularly waiting for a change. On the bright side of things, if there is no change, it does NOT trigger anything, which is nice. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] Why can't I run a Rake task inside my migration?

2009-08-10 Thread John Small
I have a Rake task which I've developed as part of a set of data migrations. The task has to be run after a particular migration has run. The migration changes the table structure and then the Rake task comes in and plays with the data. So the obvious thing is to invoke the Rake task at the end

[Rails] Re: Why can't I run a Rake task inside my migration?

2009-08-10 Thread Robby Russell
What error is coming back from the database? How are you executing the rake task? When you're running a migration, you are running a rake task. Robby On Mon, Aug 10, 2009 at 7:00 AM, John Smallrails-mailing-l...@andreas-s.net wrote: I have a Rake task which I've developed as part of a set of

[Rails] Default route + URL

2009-08-10 Thread Jai Jk
Hi, I am new to Ruby on Rails and I was wondering about this... If the default route in routes.rb file is map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' Why is the edit URL when generated by using a helper in this format /blog/2/edit and not

[Rails] Re: active record multiple table inheritance with abstract parent

2009-08-10 Thread boblu
To IIan Can you tell me what do you mean? If you mean whether I tried the following class Property AR::Base self.abstract_class = true belongs_to :dictionary, :foreign_key = 'dictionary_id', :class = # {self.class.name.to_s[0..1]}Dictionary end I can tell you it does not work, because

[Rails] Re: ruby include in the plugin 'init' works only in console mode

2009-08-10 Thread James Adam
On Aug 10, 2:38 pm, Frederick Cheung frederick.che...@gmail.com wrote: On Aug 10, 2:08 pm, Krishna krishna.vi...@gmail.com wrote: That however does not work.. and while debugging I find that any call inside the Thing instance methods (rails development mode) returns a method not

[Rails] insert record in table error

2009-08-10 Thread Wap Addon
i have cateadd.html.erb file in admins folder and i want call admins controller and define method like this def cateadd @pro_categorie = ProCategorie.new respond_to do |formate| format.html # new.html.erb format.xml { render :xml = @pro_categorie }

[Rails] Re: gem update fails with checking for fcgiapp.h... no

2009-08-10 Thread Bob Smyph
GoranTornqvist wrote: solved it... fcgipp.h was in /usr/local/include symlinking to /usr/include solved it. I do not understand what you mean by 'symlinking' could you please explain? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You

[Rails] Re: insert record in table error

2009-08-10 Thread Ilan Berci
Wap Addon wrote: i have cateadd.html.erb file in admins folder and i want call admins controller and define method like this def cateadd @pro_categorie = ProCategorie.new respond_to do |formate| format.html # new.html.erb format.xml { render :xml

[Rails] Re: how to pass a checkbox list values to controller

2009-08-10 Thread Rails List
Wasim Akram wrote: hi all, can anybody say me how to pass a checkbox list values to controller using submit_remote_toand how to use the same thing in controller let us say you are displaying list of records with a check box in your view and you want to delete those marked records in your

[Rails] Re: Speeding up ActiveRecord Querying on very large joins?

2009-08-10 Thread Alpha Blue
Well I found a way to reach a middle ground. I created a cache table that houses the exact fields for the data I pull using VM. So, the methods that pull the data were moved to a task and I can pre-populate the cache table with the data for that week. So, my cache table will have 120 rows

[Rails] Re: ajax file upload question

2009-08-10 Thread Chris Habgood
I do know the difference but when I move the code into the main form it tries to submit the whole form. On Sun, Aug 9, 2009 at 11:59 PM, Vinay Seshadri yourstruly.vi...@gmail.comwrote: Can you be more descriptive? If the file is related to the model who's form is on the page, then the file

[Rails] Re: insert record in table error

2009-08-10 Thread Frederick Cheung
On Aug 10, 3:34 pm, Wap Addon rails-mailing-l...@andreas-s.net wrote: i have cateadd.html.erb file in admins folder and i want call admins controller and define method like this            def cateadd     @pro_categorie = ProCategorie.new     respond_to do |formate|     format.html #

[Rails] Re: gem update fails with checking for fcgiapp.h... no

2009-08-10 Thread Marnen Laibow-Koser
Bob Smyph wrote: GoranTornqvist wrote: solved it... fcgipp.h was in /usr/local/include symlinking to /usr/include solved it. I do not understand what you mean by 'symlinking' could you please explain? He made a symbolic link (symlink) to that file. Since this is an OS concept and

[Rails] Re: Best Practices Question

2009-08-10 Thread byrnejb
On Aug 6, 10:43 am, TomRossi7 t...@themolehill.com wrote: Should models call action mailers, or should those calls always originate from controllers?  For example, should user.forgot_password send the email, or should the user_controller.forgot_password? Just looking for some opinions...

[Rails] Re: HOW TO SPECIFY CSS

2009-08-10 Thread Philip Gavrilos
Ahad Amdani wrote: Newb Newb wrote: Hi... i used paulca-phone_codes plugin for country code.and it works. %= f.select :country_code, PhoneCode.options_for_select(:prefix)% what i want to know is how to apply css class for this.when i tried like below it doesnot work %= f.select

[Rails] Re: HOW TO SPECIFY CSS

2009-08-10 Thread John Yerhot
%= post.body, :class= body_text % On Aug 10, 11:40 am, Philip Gavrilos rails-mailing-l...@andreas- s.net wrote: Ahad Amdani wrote: Newb Newb wrote: Hi... i used paulca-phone_codes plugin for country code.and it works. %= f.select :country_code, PhoneCode.options_for_select(:prefix)%

[Rails] Re: HOW TO SPECIFY CSS

2009-08-10 Thread Philip Gavrilos
John Yerhot wrote: %= post.body, :class= body_text % On Aug 10, 11:40�am, Philip Gavrilos rails-mailing-l...@andreas- I have been tried this but dint work :/ error: SyntaxError in Posts#show compile error /Users/webstic/Sites/weblog2/app/views/posts/_post.html.erb:6: syntax error,

[Rails] Re: Rails based Point of Sale?

2009-08-10 Thread Rimantas Liubertas
* mySQL replication probably isn't a great way to share price info, but I could be wrong. * Definitely consider PostgreSQL.  It's a much better, higher-performance DB than mySQL. I would add that take these advices from someone who cannot even spell MySQL properly with a huge grain of salt

[Rails] testing exception notification plugin with rspec

2009-08-10 Thread Yoann-Z
Hi, I'm trying to install exception notification plugin and test it with rspec. The problem that I have is that when running the server in production mode : at the end of the log i get this when I have a critical error rendering section request rendering section session rendering section

[Rails] Re: xml-containing models

2009-08-10 Thread jhaagmans
Right, we've decided today that XML-parsing is not the way to go, as long as my client can easily add functions to the machines. So I'm combining all your ideas into a suitable idea (Josh's comments are especially helpful) and got to this: A model called machine simply to define the unique

[Rails] Re: Why can't I run a Rake task inside my migration?

2009-08-10 Thread John Small
Robby Russell wrote: ..When you're running a migration, you are running a rake task. Which is exactly why I'm so puzzled. The postgres adapter gets a problem when trying to get the data structure for a table, it fails on this query SELECT a.attname, format_type(a.atttypid, a.atttypmod),

[Rails] A copy of ApplicationController has been removed from the module tree but is still active!

2009-08-10 Thread Tony Arcieri
Yes, more dependencies.rb fun! As far as I'm able to ascertain, these errors started appearing after upgrading from Rails 2.3.1 to 2.3.2 and persist in 2.3.3. They're highly nonderministic and appear rather sporadically, which makes it extremely frustrating. Multiple developers on our team

[Rails] Best way to copy a table using ActiveRecord

2009-08-10 Thread Jeff Miller
Hey guys, I'm trying to copy the entire content of table actives to the table olds. What I've done in the past is use regular SQL statements, but I'd like to make my code more Ruby-ish I suppose. Using SQL, I would usually run a DELETE FROM olds to clear that table, then iterate over everything

[Rails] Using Net::HTTP::Proxy Object

2009-08-10 Thread David Sainte-claire
I have been testing some web service calls that I am able to successfully make as long as I am connecting to the development environment which is on the inside of our corporate firewall, but when I attempt to connect to the production web servers on the other side of the firewall, I never get

[Rails] Re: ActiveRecord - %= and % yielding different records

2009-08-10 Thread Hassan Schroeder
On Mon, Aug 10, 2009 at 11:38 AM, djolleyddjol...@gmail.com wrote: 1     def update() 2       outfile=File.open('/tmp/look1','w') 3       outfile.puts(params.inspect) 4       outfile.close 5       @member=Member.find(params[:id].to_i) 6       outfile=File.open('/tmp/look2','w') 7      

[Rails] Re: ActiveRecord - %= and % yielding different records

2009-08-10 Thread djolley
Thanks for the input. I *THINK* that I have it right; but, just to avoid any possible confusion, here is my relevant model code: class Member ActiveRecord::Base def self.profile(decimal_profile) profile=['Members List','Other List 1','Other List 2']

[Rails] Re: ActiveRecord - %= and % yielding different records

2009-08-10 Thread djolley
I just wanted to mention that I think that this issue has boiled down to, Why are the params different? When we know that, I think that we'll have the answer. Thanks again. ... doug --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: A big paginate plugin problem

2009-08-10 Thread Frederick Cheung
On Aug 10, 7:07 pm, Kayne m.bra...@gmail.com wrote: undefined method `paginate' for #CommunityController:0x49985b4 And now, I don't know what to do. Any solutions? Have you tried looking at the will_paginate examples at http://gitrdoc.com/mislav/will_paginate/tree/master/ ? Fred

[Rails] Re: Rails based Point of Sale?

2009-08-10 Thread Marnen Laibow-Koser
Rimantas Liubertas wrote: * mySQL replication probably isn't a great way to share price info, but I could be wrong. * Definitely consider PostgreSQL.  It's a much better, higher-performance DB than mySQL. I would add that take these advices from someone who cannot even spell MySQL

[Rails] Re: Best way to copy a table using ActiveRecord

2009-08-10 Thread James West
Seriously, The best way to ahieve this is in a stored procedure in the database. Just create a method on your model class that will run the stored proc, that way your controllers and rake tasks etc... can have access to the functionality if you want them to . Let the database do the job it's

[Rails] Re: ActiveRecord - %= and % yielding different records

2009-08-10 Thread bill walton
On Mon, 2009-08-10 at 12:28 -0700, djolley wrote: I just wanted to mention that I think that this issue has boiled down to, Why are the params different? When we know that, I think that we'll have the answer. Thanks again. The params hash get passed from the view to the controller. So the

[Rails] Re: Why can't I run a Rake task inside my migration?

2009-08-10 Thread Marnen Laibow-Koser
John Small wrote: Robby Russell wrote: ..When you're running a migration, you are running a rake task. Which is exactly why I'm so puzzled. The postgres adapter gets a problem when trying to get the data structure for a table, it fails on this query SELECT a.attname,

[Rails] Re: Why can't I run a Rake task inside my migration?

2009-08-10 Thread Robby Russell
By chance are you attempting to add a new table for a new model? (and then trying to add some data to populate it?) Robby On Mon, Aug 10, 2009 at 11:21 AM, John Smallrails-mailing-l...@andreas-s.net wrote: Robby Russell wrote: ..When you're running a migration, you are running a rake task.

[Rails] A big paginate plugin problem

2009-08-10 Thread Kayne
Hi, I've got big problem. I was looking google for some info, but unfortunately, no solutions help me. So, my problem is: I've got this code: @pages, specs = paginate :specs, :conditions = [last_name like ?, @initial+'%'], :order = last_name, first_name, :per_page =

[Rails] QA testingtools jobs

2009-08-10 Thread Eprojecthelp Inc
Are you looking for Jobs in QA Testing Tools, Interact with recruiters and trainers @ eprojecthelp.com -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: HOW TO SPECIFY CSS

2009-08-10 Thread Frederick Cheung
On Jun 23, 7:10 am, Newb Newb rails-mailing-l...@andreas-s.net wrote: Hi... i used paulca-phone_codes plugin for country code.and it works. %= f.select :country_code, PhoneCode.options_for_select(:prefix)% what i want to know is how to apply css class for this.when i tried like below it

[Rails] Re: Speeding up ActiveRecord Querying on very large joins?

2009-08-10 Thread Alpha Blue
Well, good news and I want to thank Matt first and then Marnen second for their input into this. My old setup, even with the low query times was doing a full render of my VM matchup page in 540-620ms from start to completion. With the new single table setup using the cache table, my full time

[Rails] Re: ActiveRecord - %= and % yielding different records

2009-08-10 Thread djolley
The params hash get passed from the view to the controller. Really? I'm definitely thinking the other way around. Let's think about this for a minute. In the URL box of my browser I enter 'http:// my_host/members/update/15' and press enter. I would expect this request to be routed to the

[Rails] Re: A big paginate plugin problem

2009-08-10 Thread Kayne
Yes, but I didn't understand this... I'm newb. I use now RailsSpace book. Will you so cool and translate to me: How can I change my code for will_paginate, please? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: ActiveRecord - %= and % yielding different records

2009-08-10 Thread Hassan Schroeder
On Mon, Aug 10, 2009 at 12:19 PM, djolleyddjol...@gmail.com wrote: Thanks for the input.  I *THINK* that I have it right; but, just to avoid any possible confusion, here is my relevant model code: Yeah, I'm pretty sure that's not what you want :-) Consider the following: ripple:~$ irb

[Rails] Re: A big paginate plugin problem

2009-08-10 Thread Maurício Linhares
RailsSpace is clearly outdated and that old paginate method should not be used anymore. You're better served getting a newer book like the latest Agile web development with Rails. - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Mon, Aug 10, 2009 at

[Rails] Re: A big paginate plugin problem

2009-08-10 Thread Frederick Cheung
On Aug 10, 9:24 pm, Kayne m.bra...@gmail.com wrote: Yes, but I didn't understand this... I'm newb. I use now RailsSpace book. Will you so cool and translate to me: How can I change my code for will_paginate, please? It's pretty simple. Your models gain a paginate method that is pretty much

[Rails] Re: A big paginate plugin problem

2009-08-10 Thread Kayne
Ok, I make like this: @pages, specs = Spec.paginate :specs, :page = 30, :order = 'last_name, first_name', :conditions = [last_name like ?, @initial+'%'] And when I want to execute this code. browser gives me back: Couldn't find Spec with ID=1 AND (last_name like

[Rails] ActiveRecord to_json encoding

2009-08-10 Thread Calvin Nguyen
Question: Hi, our company is using Ruby 1.8.6 with Rails 2.2.2. Does anyone know how we can explicitly specify what encoding to use when calling .to_json on an ActiveRecord? Description: We have some multibyte characters in our database. For example we have a table with a name column that has

[Rails] Re: A big paginate plugin problem

2009-08-10 Thread Frederick Cheung
On Aug 10, 10:36 pm, Kayne m.bra...@gmail.com wrote: And here I have not any idea, how use will_paginate. Can you shot me a solutions? See http://www.pathf.com/blogs/2008/06/how-to-use-will_paginate-with-non-activerecord-collectionarray/ Fred

[Rails] Re: A big paginate plugin problem

2009-08-10 Thread Kayne
Yeah, you right. But who will pay for it? ;) Ok, I made it. I'm go to... the next problem ;) I don't know.. I hope you can help me. I've got that code: if params[:q] query = params[:q] # Najpierw wyniki spośród użytkowników... @users = User.find_with_ferret(query, :limit

[Rails] LDAP - binding and selection lists

2009-08-10 Thread KT
Hi all, Let me apologize in advance if I'm overcomplicating my post I currently use AuthLogic along with this LDAP validation method in the User model : class User ActiveRecord::Base def valid_ldap_credentials?(password_plaintext) ldap =

[Rails] Re: ActiveRecord - %= and % yielding different records

2009-08-10 Thread djolley
You'd probably do well to open up a console and try experimenting directly with Member.profile and variations. Well, unfortunately, I have already done that. Member.profile seems to behave exactly as expected in a variety of cases tested. Also, if you look at the debug data you can see that

[Rails] Re: A big paginate plugin problem

2009-08-10 Thread Frederick Cheung
On Aug 10, 9:50 pm, Kayne m.bra...@gmail.com wrote: Ok, I make like this:       @pages, specs = Spec.paginate :specs,         :page = 30,         :order = 'last_name, first_name',         :conditions = [last_name like ?, @initial+'%'] And when I want to execute this code. browser gives

[Rails] Re: ActiveRecord to_json encoding

2009-08-10 Thread Frederick Cheung
On Aug 10, 10:02 pm, Calvin Nguyen rails-mailing-l...@andreas-s.net wrote: Question: Hi, our company is using Ruby 1.8.6 with Rails 2.2.2.  Does anyone know how we can explicitly specify what encoding to use when calling .to_json on an ActiveRecord? Description: We have some multibyte

[Rails] Re: testing exception notification plugin with rspec

2009-08-10 Thread s.ross
On Aug 10, 2009, at 11:05 AM, Yoann-Z wrote: Hi, I'm trying to install exception notification plugin and test it with rspec. The problem that I have is that when running the server in production mode : at the end of the log i get this when I have a critical error rendering section

[Rails] Re: ActiveRecord - %= and % yielding different records

2009-08-10 Thread djolley
Commenting or uncommenting that line has nothing at all to do with what the controller is receiving in the params hash from a request initiated via a page rendered in the last cycle. Or from a direct call from a browser. My sentiments exactly. That's why I'm having so much difficulty

  1   2   >