[Rails] Re: rspec test cannot be passed when render partial in layout

2009-02-12 Thread MaD
would be nice to know if your page renders correctly when you access it with your browser. also post the code of the partial that's causing the error and of course the error itself. what's respec's output? --~--~-~--~~~---~--~~ You received this message because you

[Rails] Re: Download Movie through link

2009-02-12 Thread Deepak Mahajan
MaD wrote: if i understand correctly you can click that link, choose the option 'save as', download it to you hd and watch it. but you if you click the link and choose 'open', your video player opens but doesn't show any content. correct? if so i don't think it's a problem with your rails

[Rails] Re: rspec test cannot be passed when render partial in layout

2009-02-12 Thread zerogy
Thanks for your replying. the page render correctly since i would visit it via browser, and it works all right. in fact, there is nothing special in my partial, i pasted it below: _footer.html.erb: div id=footer-wrap div id=footer div class=bottom-links div class=bottom-nav

[Rails] Re: Download Movie through link

2009-02-12 Thread MaD
alright, then let's take a look at your code... how does it work? do you store your files in a folder inside your public-directory and filename points to that location? or do you store your files inside your database? what exactly is Movie.file and Movie.filename? the following line throws me

[Rails] Re: rspec test cannot be passed when render partial in layout

2009-02-12 Thread MaD
and each error has same informationm which is wrong number of arguments (3 for 1) which method is called with 3 arguments instead of 1? is there anymore information you can give us? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] Re: Column not in table (legacy database)

2009-02-12 Thread Peter De Berdt
On 12 Feb 2009, at 00:21, Pete wrote: class Employee ActiveRecord::Base has_one :job has_one :job, :foreign_key = shssn, :dependent = :destroy set_primary_key emssan def self.table_name() peis301 end def name #{emfnam} #{emlnam} end end The question is: Why is Rails looking

[Rails] Re: Download Movie through link

2009-02-12 Thread Hitesh Rawal
Deepak Mahajan wrote: MaD wrote: if i understand correctly you can click that link, choose the option 'save as', download it to you hd and watch it. but you if you click the link and choose 'open', your video player opens but doesn't show any content. correct? if so i don't think it's a

[Rails] Re: rspec test cannot be passed when render partial in layout

2009-02-12 Thread zerogy
i just do not know which method is called with 3 arguments instead of 1, so i could not solve the problem. and i pasted the relevant code below: routes.rb: ... map.resources :users, :member = { :suspend = :get, :unsuspend = :get } users_controller.rb: ... # render new.rhtml def new @user

[Rails] Re: rspec test cannot be passed when render partial in layout

2009-02-12 Thread zerogy
thank you very much and i am going to debug to find out the source problem On Feb 12, 5:27 pm, MaD mayer.domi...@gmail.com wrote: it's hard to say what wenbt wrong. most likely you forgot to put a closing bracket somewhere or sth similar. i'd try to set a debugger into that test and go

[Rails] Re: NoMethodError

2009-02-12 Thread MaD
obviously it starts here: app/controllers/sorts_controller.rb:76:in `destroy' show us the code for that method. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group,

[Rails] Re: NoMethodError in User_photos#show

2009-02-12 Thread MaD
well, the error-message is pretty clear: The error occurred while evaluating nil.user 2:   %= link_to #...@photo.user.username}'s Photos, @photo seems to be nil. the reason for it can be found in your controller (where show is defined). --~--~-~--~~~---~--~~ You

[Rails] routes

2009-02-12 Thread bingo bob
I'm trying to figure this. in my schools controller i want to do this # implement a create action to create just the review for the School... def create_review_for_a_school @review = Review.new @school = School.find(params[:school_id]) @review =

[Rails] Re: Download Movie through link

2009-02-12 Thread Deepak Mahajan
Hitesh Rawal wrote: Deepak Mahajan wrote: MaD wrote: if i understand correctly you can click that link, choose the option 'save as', download it to you hd and watch it. but you if you click the link and choose 'open', your video player opens but doesn't show any content. correct? if so i

[Rails] Re: file uploading using ajax

2009-02-12 Thread Mathieu Rousseau
pena que parece que só funciona com jQuery... On Wed, Feb 11, 2009 at 7:05 PM, guyb guyboer...@googlemail.com wrote: Use LiveQuery then you don't need rjs and responds_to_parent http://rails-revlog.blogspot.com/2009/02/ajax-sort-of-file-upload-using.html Guy Boertje

[Rails] Re: setting up remote rails

2009-02-12 Thread Mathieu Rousseau
who did you start your ror server? which one are you using? On Wed, Feb 11, 2009 at 6:48 PM, The Dro desaa...@gmail.com wrote: I've got a remote machine on my network which has Ubuntu as the OS. I run my testserver on it with all my current PHP sites. All I have to type on my main Vista

[Rails] Re: Number formatter

2009-02-12 Thread Michael Hasenstein
Gavin Kistner wrote: While ActionView in rails does have a helper for this, it requires you to supply the number of decimal places. What follows is my own code (as a Ramaze helper) that (by default) automatically determines the number of decimal places based on the size of the answer. I

[Rails] Re: routes

2009-02-12 Thread Hitesh Rawal
bingo bob wrote: I'm trying to figure this. in my schools controller i want to do this result I think i need a route...something like this map.connect '/schools/:school_id/reviews/new', :controller = 'schools', :action = 'create_review_for_a_school' -- But it's

[Rails] Questions about Sassy, the recurring payment system

2009-02-12 Thread Zac Zheng
Hi Alex, I read about your Sassy release on LRUG's mailing list sometime ago. Now that I need to implement an ecommerce subscription system for a client, I have been delving into your code. I have a few questions if you don't mind answering. I thought I would post on here for the benefit of

[Rails] Re: Rails 2.2, abstract_class, and associations

2009-02-12 Thread Frederick Cheung
On 11 Feb 2009, at 22:09, Jim wrote: Anyone have any ideas on either a better way to handle the attribute names, or where to start looking to figure out how to make this work? Have you also overridden respond_to? Fred Thanks, Jim Crate Que Viva, LLC

[Rails] Re: insert rails into php

2009-02-12 Thread Frederick Cheung
On 12 Feb 2009, at 04:43, Sniper Abandon wrote: Frederick Cheung wrote: On 11 Feb 2009, at 10:37, Sniper Abandon wrote: apache, nginx etc... can certainly forward the request to different places based on the url (and other things). Where things might get complicated is to what extent your

[Rails] WAP in Rails

2009-02-12 Thread king
Hi All, I am linux system admin...currently we have web application in PHP. Considering to have wap version of the same and looking to get it done in rails. Can any one suggest for what it takes to get wap in rails. Also links to tutorials and guides are appreciated. Thank You Kanthi

[Rails] Re: Multiple associations with to_json

2009-02-12 Thread MiquelH
Hi, I am facing the same problem and looks like the following construction works: booking..to_json(:include = {:booking_state = {}, :customer = {include = :customer_phones}}) Not as clean and nice as the expected though: booking..to_json(:include = [:booking_state, {:customer = {include =

[Rails] Re: Trying to make this application RESTy

2009-02-12 Thread Krishna Sankar (ksankar)
I think there are two ways of looking at this: a) Set of Orders. Then 2) and 3) are nothing but edit on an order. b) Set of lines. Then 2) and 3) are index lines with a find clause (for example find unassigned lines or find unrecorded lines) and then edit on an individual line. HTH.

[Rails] Re: setting up remote rails

2009-02-12 Thread MaD
1 you might want to configure your apache (or whatever webserver you use) to forward your mongrel on port 3000. look for something like this (for your webserver and operation system): http://schwuk.com/articles/2006/06/13/hosting-rails-applications-with-mongrel-apache-2-mod_proxy-on-debian-stable

[Rails] Re: Refactoring RJS

2009-02-12 Thread Frederick Cheung
On 12 Feb 2009, at 02:59, David wrote: Hi Fred, thanks so much for your response, that is exactly what I was looking for. What do you mean by rjs can be a bit of a crutch? I mean that you can torture yourself for a long time trying to convince rjs to do something whereas you could get it

[Rails] Re: bundle_fu making my app very slow

2009-02-12 Thread Mukund
Use Rails in-built caching instead. If you want to use bundle_fu to obfuscate your scripts, then you need to note that it will take a long time the first time the server is run for doing the caching. Subsequent requests will be faster. Regards, Mukund On Feb 12, 11:25 am, zero0x

[Rails] named_scope and having?

2009-02-12 Thread Gabriele Tassoni
Hi all, is just my fault.. or I can't write an having caluse for a group in a named scope? °_° i.e. named_scope :last_year_best_buyers, :joins = :invoices, :conditions = {invoices.closed = true, invoices.issued_on = 1.years.ago..Date.today}, :group = customers.id, :having = SUM

[Rails] Re: named_scope and having?

2009-02-12 Thread Gabriele Tassoni
Well... I always can specify it on the group clause.. but it doesn't look so clean to me (esp. since the find method has the having clause... °_°) named_scope :last_year_best_buyers, :joins = :invoices, :conditions = {invoices.closed = true, invoices.issued_on = 1.years.ago..Date.today}, :group

[Rails] Re: named_scope and having?

2009-02-12 Thread MaD
are you running rails 2.3 or higher? --~--~-~--~~~---~--~~ 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] Re: named_scope and having?

2009-02-12 Thread Gabriele Tassoni
Another problem with having to specify the HAVING in the group key.. is that it looks like it would lead to errors when sequencing multiple named_scopes, i.e.: Customer.last_year_best_buyers.with_active_account But I have to investigate more on this... G.

[Rails] Should I sleep here?

2009-02-12 Thread Gavin
Hi I'm building an app at the moment where specific items can be added to an order and then purchased through paypal. Becuase the items are limited, it's important to relist them quickly if the order is not completed within 5mins. Anybody have any suggestions as to how I could go about this?

[Rails] Re: Should I sleep here?

2009-02-12 Thread MaD
take a look at backgrounDRb. maybe this could be an option for you. http://backgroundrb.rubyforge.org/ in a background process you could sleep for as long as you want to, but if you try that in your main process your application might freeze for that amount of time.

[Rails] Re: Should I sleep here?

2009-02-12 Thread Gavin
I thought that may be the case Thanks for your help - will read up on background DRb On 12 Feb, 12:30, MaD mayer.domi...@gmail.com wrote: take a look at backgrounDRb. maybe this could be an option for you.http://backgroundrb.rubyforge.org/ in a background process you could sleep for as long

[Rails] Pass variables inside the page

2009-02-12 Thread Enzo Rivello
Hi! I need to create a combobox which , depending on the selected value, will display different items whithout reloading the page %= select(product,choice, Pricebooks.find(:all).collect { |p| [p.name,p.id]}, {:selected = Pricebooks.find(:first)} , {onchange = ???)% How can i retrieve the value

[Rails] Common action for all the controllers.

2009-02-12 Thread Siddick Ebramsha
I am writing a small plugin for ruby on Rails. I faced a problem while create a common action for all the controllers. I found a solution for it, But i am not satisfied with the solution. The solution that I got is :- ActionController::Base.class_eval do def common_action render :text =

[Rails] i18n with Rails 2.1

2009-02-12 Thread Jeba Momin
Hi. I'm currently using Rails 2.1. But i want to use i18n to internationalize my rails application. I'm trying to install rails 2.2 using: gem update rails but it gives me an error... Can anyone please suggest..how do I do this??? Thank You. -- Posted via http://www.ruby-forum.com/.

[Rails] Re: i18n with Rails 2.1

2009-02-12 Thread Mathieu Rousseau
Maybe a little more detail would help... OS? Error? On Thu, Feb 12, 2009 at 10:56 AM, Jeba Momin rails-mailing-l...@andreas-s.net wrote: Hi. I'm currently using Rails 2.1. But i want to use i18n to internationalize my rails application. I'm trying to install rails 2.2 using: gem update

[Rails] Re: i18n with Rails 2.1

2009-02-12 Thread Jeba Momin
Mathieu Rousseau wrote: Maybe a little more detail would help... OS? Error? On Thu, Feb 12, 2009 at 10:56 AM, Jeba Momin OS:windows XP Error: ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) bad response ( The request is not supported. ) 500 (http://gems.rubyforge.v

[Rails] Re: named_scope and having?

2009-02-12 Thread Gabriele Tassoni
On 12 Feb, 13:13, MaD mayer.domi...@gmail.com wrote: are you running rails 2.3 or higher? no, I'm not, I'm using rails 2.2.2... (the current stable, I believe...) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: i18n with Rails 2.1

2009-02-12 Thread Mathieu Rousseau
The urls it tries to download the gem from is not working... I do not know anything about mirrors, hope someone else here knows... On Thu, Feb 12, 2009 at 11:04 AM, Jeba Momin rails-mailing-l...@andreas-s.net wrote: Mathieu Rousseau wrote: Maybe a little more detail would help... OS?

[Rails] Re: i18n with Rails 2.1

2009-02-12 Thread MaD
try specifying the source: gem update rails --source=http://gems.rubyforge.org other than that try to update your rubygems. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

[Rails] Re: Should I sleep here?

2009-02-12 Thread Frederick Cheung
On 12 Feb 2009, at 12:32, Gavin wrote: I thought that may be the case Thanks for your help - will read up on background DRb another possibility is to have a cron job or daemon that checks for orders that have been waiting for too long (stick a expires_at column or something on the

[Rails] Re: Pass variables inside the page

2009-02-12 Thread Frederick Cheung
On 12 Feb 2009, at 12:40, Enzo Rivello wrote: Hi! I need to create a combobox which , depending on the selected value, will display different items whithout reloading the page %= select(product,choice, Pricebooks.find(:all).collect { |p| [p.name,p.id]}, {:selected =

[Rails] Re: named_scope and having?

2009-02-12 Thread MaD
i may be wrongv but i think :having in scopes is new to rails 2.3 --~--~-~--~~~---~--~~ 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

[Rails] Re: Pass variables inside the page

2009-02-12 Thread Enzo Rivello
Frederick Cheung wrote: On 12 Feb 2009, at 12:40, Enzo Rivello wrote: How can i retrieve the value of the selected product through onchange? is this entirely client side or do you want to make an ajax request ? Fred if possible only on client side -- Posted via

[Rails] Re: Pass variables inside the page

2009-02-12 Thread Mathieu Rousseau
That's pure JS then. onChange(this), and treat it accordingly... On Thu, Feb 12, 2009 at 11:17 AM, Enzo Rivello rails-mailing-l...@andreas-s.net wrote: Frederick Cheung wrote: On 12 Feb 2009, at 12:40, Enzo Rivello wrote: How can i retrieve the value of the selected product through

[Rails] Re: named_scope and having?

2009-02-12 Thread MaD
quote changelog: *2.3.0/3.0* * Add :having as a key to find and the relevant associations. [miloops] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: i18n with Rails 2.1

2009-02-12 Thread Jeba Momin
MaD wrote: try specifying the source: gem update rails --source=http://gems.rubyforge.org other than that try to update your rubygems. Hey.. Thank You so much... that worked for me... Thanks again... -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Pass variables inside the page

2009-02-12 Thread Enzo Rivello
Mathieu Rousseau wrote: That's pure JS then. onChange(this), and treat it accordingly... On Thu, Feb 12, 2009 at 11:17 AM, Enzo Rivello and trough server side, how would it be? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You

[Rails] Re: Pass variables inside the page

2009-02-12 Thread Mathieu Rousseau
well, you can submit a classic form request and reload the whole page, or submit an ajax request and then update just a part of your page. I think that you should decide what you want do, then hack this solution. Not decide what you want to do because it seems simpler to do. On Thu, Feb 12, 2009

[Rails] Re: Opening file content into a textarea

2009-02-12 Thread elioncho
Many thanks MaD, I'll try it out. On Feb 12, 2:55 am, MaD mayer.domi...@gmail.com wrote: in ruby there is the class File:http://www.ruby-doc.org/core/classes/File.html to get the contents of your file try something like:   my_file = File.new(path_to_file, 'r')   @my_file_content =

[Rails] Re: insert rails into php

2009-02-12 Thread elioncho
Hey guys I’ll leave this two links here if you’re interested in working with subdomains: http://www.37signals.com/svn/posts/1512-how-to-do-basecamp-style-subdomains-in-rails http://www.robbyonrails.com/articles/2009/01/11/subdomain-accounts-with-ruby-on-rails-explained On Feb 11, 11:43 pm,

[Rails] Re: named_scope and having?

2009-02-12 Thread Gabriele Tassoni
On 12 Feb, 14:18, MaD mayer.domi...@gmail.com wrote: quote changelog: *2.3.0/3.0* * Add :having as a key to find and the relevant associations. Thank you.. ^_^ I was guessing about it since your first post.. now I just hobe rail 2.3 won't brake too much things, it's never good to have to

[Rails] Re: Common action for all the controllers.

2009-02-12 Thread MaD
that's right, but you didn't mention you were trying to write a plugin. in that case try to write it like this: # my_plugin.rb: module MyPlugin def my_action end end # init.rb: ActionController::Base.send :include, MyPlugin hope i didn't forget anything.

[Rails] Re: Common action for all the controllers.

2009-02-12 Thread MaD
sorry, just checked it. i gotta be like this: # my_plugin.rb: module MyPlugin def self.included(base) base.extend(ClassMethods) end module ClassMethods def my_action # ... end end end irb(MyOtherController):001:0

[Rails] Re: ROXML from_xml not returning an object instance...

2009-02-12 Thread Ben Woosley
Alright, I found that this actually required a bit more to work properly, but if you look at my latest code: http://github.com/Empact/roxml/tree/master, I have a examples/active_record.rb, and spec/examples/active_record.rb to show it's working properly. So install this latest version from my

[Rails] Re: Common action for all the controllers.

2009-02-12 Thread Ar Chron
If you have any alternate solution, please provide. I didn't go the plugin route in our application, but opted for a form of behavior by convention class GenericController ApplicationController # here's the standard index method def index blah blah blah end # here's a new common

[Rails] Auto Complete

2009-02-12 Thread Miguel Regedor
What I'm trying to do: I want to create an auto completed field for locations, but didn't want to have the locations stored in my app. My idea is to somehow use Google to fill that auto complete text field and then retrieve chords using gmaps geocoding. Have anyone done something like this? does

[Rails] Re: Should I sleep here?

2009-02-12 Thread Robert Walker
Gavin wrote: Anybody have any suggestions as to how I could go about this? I was thinking of creating an observer for orders and including an after_create like so: Class OrderObserver ActiveRecord::Observer def after_create sleep 300 # sleep for 5 mins if self.status 3 #

[Rails] Re: Should I sleep here?

2009-02-12 Thread Gavin
So, would it be more appropriate to write a method like def purchased? if self.status 3 return true else return false end end and then call the purchased? method to perform the check? On 12 Feb, 14:39, Robert Walker rails-mailing-l...@andreas-s.net wrote: Gavin wrote:

[Rails] acts_as_list sort by multiple items

2009-02-12 Thread Tod Mcintyre
I have a Person model and I'm using acts_as_list so I can have drag/drop positioning of people. The only thing is, I want to be able to differentiate between male and female, ie. sort males separately from females. It seems completely useless to have two separate models since all the other

[Rails] Re: cPanel Ruby Gems

2009-02-12 Thread Michael Mike
Did you find a solution to this? I am experiencing the same problem. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

[Rails] Re: Should I sleep here?

2009-02-12 Thread Robert Walker
Gavin wrote: So, would it be more appropriate to write a method like def purchased? if self.status 3 return true else return false end end and then call the purchased? method to perform the check? On 12 Feb, 14:39, Robert Walker rails-mailing-l...@andreas-s.net

[Rails] Re: Should I sleep here?

2009-02-12 Thread Gavin
Writing more unit tests for this as we speak Thanks for the tip Robert PS - I presume, if I were to use constants that I would define the constants in the class itself? On 12 Feb, 15:17, Robert Walker rails-mailing-l...@andreas-s.net wrote: Gavin wrote: So, would it be more appropriate to

[Rails] Re: Rails 2.2, abstract_class, and associations

2009-02-12 Thread Jim
On Feb 12, 6:11 am, Frederick Cheung frederick.che...@gmail.com wrote: Have you also overridden respond_to? No, I haven't. But I'm curious what I would do with respond_to? that would affect method_missing? Jim --~--~-~--~~~---~--~~ You received this

[Rails] Re: Auto Complete

2009-02-12 Thread Robert Walker
Miguel Regedor wrote: What I'm trying to do: I want to create an auto completed field for locations, but didn't want to have the locations stored in my app. My idea is to somehow use Google to fill that auto complete text field and then retrieve chords using gmaps geocoding. Have anyone done

[Rails] Logging all exceptions

2009-02-12 Thread koopmann.lenn...@googlemail.com
Hey everyody, what is the best way to log _all_ exceptions that are thrown in my Rails application into a database table? I need some kind of hook in the Rails exception methods?! I already tried the Exception Logger plugin but that is not what I want. I just want to log _all_ exceptions into

[Rails] Help for ActionMailer!

2009-02-12 Thread klaus.kohlbauer
Hello, I have a big problem und hoping for your help. In my application a user should be able to edit an email template file for himself and send it out e.g. to a customer. (thats the plan). For that I have created some functionality to edit the template file and an ActionMailer class with a

[Rails] Re: Help for ActionMailer!

2009-02-12 Thread Frederick Cheung
On Feb 12, 3:18 pm, klaus.kohlbauer klaus.kohlba...@infosense.de wrote: Hello, I have a big problem und hoping for your help. In my application a user should be able to edit an email template file for himself and send it out e.g. to a customer. (thats the plan). For that I have created

[Rails] Re: named_scope and having?

2009-02-12 Thread Gabriele Tassoni
H! Even worse... named_scopes completely skip the :order key if there's a HAVING clause.. °_° I thought I could have used wht I proposed at 13:00, but the named scope didn't used the group key at all to find the resultset... sic... Quite annoying, I'm really hoping 2.3 won't break too much

[Rails] Re: named_scope and having?

2009-02-12 Thread Gabriele Tassoni
On 12 Feb, 17:08, Gabriele Tassoni gabriele.tass...@gmail.com wrote: H! Even worse... named_scopes completely skip the :order key if Obviously referencing the :group key, not the :order one... --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: ActionController::RoutingError in Products#index

2009-02-12 Thread Ashok Bee
Thomas r. Koll wrote: Hi Ashok, id's are always integer. I'm quite sure it's the same with an Oracle DB. So please fix you database and retry. ciao, tom On Feb 11, 6:19�pm, Ashok Bee rails-mailing-l...@andreas-s.net wrote: create table products ( id number not null, ... primary

[Rails] Re: Pass variables inside the page

2009-02-12 Thread Enzo Rivello
Mathieu Rousseau wrote: well, you can submit a classic form request and reload the whole page, or submit an ajax request and then update just a part of your page. I think that you should decide what you want do, then hack this solution. Not decide what you want to do because it seems

[Rails] Re: routes

2009-02-12 Thread bingo bob
Anyone provide any insight? -- 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] Easy RoR - Javascript syntax question

2009-02-12 Thread Tom Ha
Hi there, a simple n00b question: I have that Javascript snippet on my page (see below; taken from jquery, actually). I want to pass it the @cities array from the controller. But what's the correct syntax, here? See the 3rd line: script

[Rails] Re: Trying to make this application RESTy

2009-02-12 Thread Anthony
But that's kind of the problem... I don't want to edit lines one at a time. I want a batch edit. On Feb 11, 11:04 pm, Krishna Sankar (ksankar) ksan...@cisco.com wrote: I think there are two ways of looking at this: a)      Set of Orders. Then 2) and 3) are nothing but edit on an order. b)  

[Rails] Re: Should I sleep here?

2009-02-12 Thread Chris Kottom
+1 for implementing this as a cron job. Sometimes the cleanest solution is outside the framework. On Thu, Feb 12, 2009 at 4:20 PM, Gavin ga...@thinkersplayground.com wrote: Writing more unit tests for this as we speak Thanks for the tip Robert PS - I presume, if I were to use constants

[Rails] Re: rake aborted! undefined method `each' for #Mysql:

2009-02-12 Thread Madhav Avd
The last suggestion that recommended downloadling libmysql.dll worked for me. Thanks! bflo...@westpac.com.au wrote: The problem is that libmysql.dll shipped with Mysql doesn't play well with ruby 2.2.. The solution is to download the libmysql.dll from:

[Rails] Re: Should I sleep here?

2009-02-12 Thread Gavin
Am I right in saying Daemons for frequent tasks (performing a specific check every minute or so) and cron jobs for less regular tasks (cleaning up sessions every week or so)? Are Daemons resource-intensive? On 12 Feb, 18:27, Chris Kottom chris.kot...@gmail.com wrote: +1 for implementing this

[Rails] Re: Rails 2.2, abstract_class, and associations

2009-02-12 Thread Jim
On Feb 12, 6:11 am, Frederick Cheung frederick.che...@gmail.com wrote: Have you also overridden respond_to? I played around with overriding respond_to?, and figured out how to make this all work. Apparently, in Rails 2.2, if respond_to? returns false, method_missing gets called on the

[Rails] Rails unixODBC

2009-02-12 Thread andypflueger
Hello, I decided to embrace getting a new Rails application to see an existing MSSQL database and trying to get unixODBC, freeTDS, and ActiveRecord able to query my MSSQL database. I'm following the procedure outlined at

[Rails] Re: Reset password facility

2009-02-12 Thread Sazima
Lovd does just that, take a look at: lovdbyless.com http://github.com/stevenbristol/lovd-by-less/tree/master Cheers, Sazima On Feb 11, 7:35 pm, Shockmeister b00020...@student.itb.ie wrote: I have used a sha256 hashing algorithm in order to provide some security to my login facility. I now

[Rails] Re: Should I sleep here?

2009-02-12 Thread Sazima
Hi, Check out this excelent railscast: http://railscasts.com/episodes/129-custom-daemon It is really easy effective. Also, Thorny Gorms has some built-in checks for form expiration: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/9ec5a5112548c95e Cheers, Sazima On Feb

[Rails] Re: Should I sleep here?

2009-02-12 Thread Gavin
Thanks Sazima - I set up a daemon like this earlier today and it's working a treat, just wasn't sure if this was the most economic way to get the job done! But if it's good enough for Ryan, it's good enough for me. On 12 Feb, 19:33, Sazima rsaz...@gmail.com wrote: Hi, Check out this

[Rails] Trying to Wrap My Head Around HM:t and HABTM w/ a Sample App

2009-02-12 Thread Josh Traxton
I am cheap and in an attempt to learn about rails relationships I'm trying to create an application that my friends and I can use as a way to split the cost of items we buy @ Costco. Right now the models i have are: User - Various people involved Run - Represents Costco runs Item - Individual

[Rails] Re: Download Movie through link

2009-02-12 Thread Jeremy Olliver
I believe that the usual thing when sending files is to use the webserver's filestreaming rather than rendering the file as text. Try something like send_file @movie.file_path, :disposition = :attachment The disposition attachment option is actually set by default, but it will provide the

[Rails] manually setting an auto-incremented primary key id

2009-02-12 Thread Jamie Forrest
I want to create a record with a manually-set custom ID, for instance: Foo.create(:id = 8000, :name =bar) But when I try to do that, Rails ignores the id I pass and continues to auto-increment the id in the table. So in other words the console output is along the lines of: Foo.find(:last) =

[Rails] Rails Music Composer

2009-02-12 Thread GabrielG1976
Hello Everyone, I have just Created a Rails online music composing site. That allows users to create new musical compositions based off the Conversion of text into a midi Composition. and then can be used with any software sequencer such as Reason 4 or GarageBand.. Compose Share Enjoy..

[Rails] Re: Auto Complete

2009-02-12 Thread Miguel Regedor
yes, I realised I'll need to fill my data base with a bunch of locations. It seems wikipedia has a big list of UK locations and towns I'll have to do a parser to somehow retrieve that information. About the plugin I would like to use jquery in my app, I found this plugin

[Rails] Re: Rails Music Composer

2009-02-12 Thread GabrielG1976
Thanks I have alot plans for this site thanks for taking the time to check it out.. On Feb 12, 12:40 am, LOUPOS KONSTANTINOS loup...@gmail.com wrote: Nice!!! Good job! On 11 Φεβ, 21:11, GabrielG1976 gabrielg1...@gmail.com wrote: I have just Created a Rails online music composing site.  

[Rails] Re: Easy RoR - Javascript syntax question

2009-02-12 Thread Freddy Andersen
%= @cities % On Feb 12, 9:13 am, Tom Ha rails-mailing-l...@andreas-s.net wrote: Hi there, a simple n00b question: I have that Javascript snippet on my page (see below; taken from jquery, actually). I want to pass it the @cities array from the controller. But what's the correct syntax,

[Rails] Re: Easy RoR - Javascript syntax question

2009-02-12 Thread Tom Ha
Holy sh... Thanks! :-) -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To

[Rails] classic pagination with custom finders/sql

2009-02-12 Thread Ball Balla
Say I have a user model with the following def active find(:all, :conditions = {:state = 'active'}) end How can I get this working with classic pagination in my controller without duplicating my logic for finding active users. ie, i do NOT want to do this def list @users = paginate(:users,

[Rails] Re: templating-like system recommendations?

2009-02-12 Thread phil
Thanks Rick... I actually mentioned Liquid in my post. I was hoping for a more robust framework / gem / base application to do more (like drag and drop adding of model fields or some built in views for model visibility) rather than having to code it all ourselves! Thanks... maybe this is just

[Rails] Building a directory tree into the database

2009-02-12 Thread elioncho
Hello, Does anyone can give me some pointers on building a directory tree. I want to map a directory of folders and files into a database. I am not sure how to do this dynamically. I think acts_as_tree could help me do this. Any ideas? Thanks, Elias

[Rails] Re: manually setting an auto-incremented primary key id

2009-02-12 Thread Rob Biedenharn
On Feb 12, 2009, at 4:21 PM, Jamie Forrest wrote: I want to create a record with a manually-set custom ID, for instance: Foo.create(:id = 8000, :name =bar) But when I try to do that, Rails ignores the id I pass and continues to auto-increment the id in the table. So in other words the

[Rails] polymorphic nested resources

2009-02-12 Thread Marcelo de Moraes Serpa
Hello list, What if I have a model called address that is polymorphic, and I also have an address resource (as I want to try to follow a RESTful design) -- how could I make polymorphic nested associations between addresses controller and other related resources (users/1/addresses **and**

[Rails] Re: polymorphic nested resources

2009-02-12 Thread Marcelo de Moraes Serpa
http://www.pathf.com/blogs/2008/07/drying-up-rails-controllers-polymorphic-and-super-controllers/ I think the article above pretty much answers my question. But please, if anyone out there has any thoughts about it, I would love to know! Thanks, Marcelo. On Thu, Feb 12, 2009 at 6:10 PM,

[Rails] Re: jQuery's fancyZoom and delayedObserver conflict.

2009-02-12 Thread Marcelo de Moraes Serpa
Ok, here's why: fancyZoom hides the target div, and its show() method then creates a duplicate of this DOM subtree. The problem is that it keeps the same ids, and we all know we can't have elements with the same ID -- thus, $() and getElementById fail. The solution was to be more specific and

[Rails] Re: 2 button_to functions for file downloads

2009-02-12 Thread Me
Anyone have any idea why one button does a submit and the other does a file download? On Feb 11, 9:36 pm, Me chabg...@gmail.com wrote: I have2button_tofunctionsthat download2different files.  the first one acts like a submit and the second on actually does downlaod thefile.  Does anyone know

  1   2   >