[Rails] HELP ON PLAY A SOUND

2010-02-05 Thread Newb Newb
Hi.. i have a .wav file in my rails public folder. i would like to play that file when i click play link in my application. so i did like below <% @file_path = "#{RAILS_ROOT}" + "/public/Server_exe/#{voicemail.file_path}" %> <%if File.exists?("#...@file_path}")%> <%= link_to image_tag("

[Rails] I can only halfway connect to oracle

2010-02-05 Thread Cris Shupp
Gurus... If I set up my project to use SQLite (so it can come up) and attempt to connect to oracle via: oracle_connect = $application_properties[$connect_string] oracle_conn = OCI8.new(oracle_id, oracle_password, oracle_connect) where oracle_connect equals '//bobs.big.boy.gov:1521/D09' (with or

[Rails] Re: radio_button_tag for every value of constant array

2010-02-05 Thread Marnen Laibow-Koser
Learn by Doing wrote: > How do I create a radio_button_tag for every value of a constant > array? E.g., I have this constant array: VALID_ORIENTATIONS = > ["Straight", "Gay", "Bisexual"] . A user is presented with a form to > search for other users according to sexual orientation. Currently, >

[Rails] Re: multiple "identical" tables

2010-02-05 Thread pepe
I second everybody else here. Add an identifier for the school in your table and you'll be happier than with the setup you were going to use. On Feb 5, 12:21 pm, Ichiro Saga wrote: > Marnen Laibow-Koser wrote: > > Ichiro Saga wrote: > >> Hi, there. > >> I was wondering if it's possible to have on

[Rails] Re: Design Pattern

2010-02-05 Thread eggie5
Thanks, this is what I was looking for.. not just a flat collection sorted by date but sorted by date with sub objects ( I don't know how to explain better). On Feb 4, 4:08 am, Rick DeNatale wrote: > On Wed, Feb 3, 2010 at 3:58 AM, eggie5 wrote: > > Hi, > > > I have a collection of arbitrary obj

Re: [Rails] Rails 3 Beta

2010-02-05 Thread Conrad Taylor
On Fri, Feb 5, 2010 at 9:31 PM, Conrad Taylor wrote: > On Fri, Feb 5, 2010 at 9:03 PM, Rong wrote: > >> Where can I post questions on Rails 3 Beta? >> >> > First, I would recommend reading the following first and > it's associated links: > > http://guides.rails.info/3_0_release_notes.html > >

Re: [Rails] Rails 3 Beta

2010-02-05 Thread Conrad Taylor
On Fri, Feb 5, 2010 at 9:03 PM, Rong wrote: > Where can I post questions on Rails 3 Beta? > > First, I would recommend reading the following first and it's associated links: http://guides.rails.info/3_0_release_notes.html If your question isn't a

[Rails] Rails 3 Beta

2010-02-05 Thread Rong
Where can I post questions on Rails 3 Beta? -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr..

[Rails] radio_button_tag for every value of constant array

2010-02-05 Thread Vincent P
How do I create a radio_button_tag for every value of a constant array? E.g., I have this constant array: VALID_ORIENTATIONS = ["Straight", "Gay", "Bisexual"] . A user is presented with a form to search for other users according to sexual orientation. Currently, the form looks like this:

Re: [Rails] Re: controller code and uninitialized constants

2010-02-05 Thread Craig White
On Fri, 2010-02-05 at 10:17 -0800, pharrington wrote: > On Feb 5, 11:19 am, Craig White wrote: > > YM4R_GM plugin... > > > > This controller code works but clearly has limitations... > > > >map_1 = GMarker.new([...@salons[0].lat, @salons[0].lng]) > >@map.overlay_init(map_1) > > > > but I r

[Rails] Re: PostgreSQL Test Database DNE for rake, does exist for ps

2010-02-05 Thread Steve H.
> That's irrelevant. What is relevant is which Postgres user account > Rails is using to connect to the DB. Does that account have the > appropriate permissions? > Postgres user account is the same name as my machine user account, that's why I mentioned it. Same postgres user has created and

[Rails] Re: Define a string as a Model object

2010-02-05 Thread Marnen Laibow-Koser
Frank_in_Tennessee wrote: > Works great now. Thank you. > > Modified Code: > > model_name = "User" > @Model = model_name.constantize > @Model.find(params[:id]).name Great. One other thing: @Model is unusual. You might consider @model instead as being more idiomatic Ruby. Best, -- Marnen Lai

[Rails] Re: I'm having trouble with Routes II

2010-02-05 Thread Marnen Laibow-Koser
Ralph Shnelvar wrote: > Marnen Laibow-Koser wrote: >> Ralph Shnelvar wrote: >> So ... I'm gonna go heads down and learn FireBug and see what the hell >>> is going on. >> >> Firebug won't help unless this is a JavaScript issue, which it almost >> certainly is not. > > FIrebug, apparently, has th

[Rails] Re: I'm having trouble with Routes II

2010-02-05 Thread Marnen Laibow-Koser
Ralph Shnelvar wrote: >>> Well ... I upgraded. Jeez, that was hard. Devise changed several of >>> its interfaces and it was a joy and a half tracking all(?) of them down. >> >> If you have comprehensive tests, then the tests tell you where things >> changed. >> >> If you don't have comprehens

[Rails] Re: tool for visualizing schema and associations

2010-02-05 Thread Marnen Laibow-Koser
bill walton wrote: > HI Jeff, > > On Fri, 2010-02-05 at 20:00 +0100, Jeff Pritchard wrote: >> of tables and associations. >> >> Anybody have a suggestion for a (hopefully free) tool for generating a >> graphical representation of this sort of info? Table contents would be >> good, but the primar

[Rails] Re: PostgreSQL Test Database DNE for rake, does exist for ps

2010-02-05 Thread Marnen Laibow-Koser
Steve H. wrote: >>Marnen Laibow-Koser wrote: >> >> Permissions issue, perhaps? And does script/dbconsole work for your >> test database? >> >> Best, >> -- >> Marnen Laibow-Koser >> http://www.marnen.org >> mar...@marnen.org > > Thanks for the response. > > Running 'script/dbconsole test' does

[Rails] Re: Ajax Update Status

2010-02-05 Thread Volkan ÇALIŞKAN
Thanks so much for the help again : ) I solved it right now with form_remote_tag, I was playing with it when I was waiting your answer. Your code helped me alot to understand the process. Here is the code working. <% form_remote_tag(:url => { :controller =>'customer/orders', :action => 'change_sa

[Rails] Re: Is this SQL possible with Rails? How can I sanitize?

2010-02-05 Thread Sharagoz --
>I tried :select => ... also before asking, but that did not work. Mind showing us the query? It should work I belive... -- 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, sen

[Rails] Re: PostgreSQL Test Database DNE for rake, does exist for ps

2010-02-05 Thread Steve H.
>Marnen Laibow-Koser wrote: > > Permissions issue, perhaps? And does script/dbconsole work for your > test database? > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > mar...@marnen.org Thanks for the response. Running 'script/dbconsole test' does put me in psql for my test databa

[Rails] Re: Is this SQL possible with Rails? How can I sanitize?

2010-02-05 Thread John Smith
Thanks a lot, find_by_sql worked! I tried to do the same, but I did not use the [ ]. I tried :select => ... also before asking, but that did not work. pharrington wrote: > On Feb 5, 2:09�pm, John Smith wrote: >> I want to do something like this in Rails: >> "SELECT *, COUNT(post_id) AS total

Re: [Rails] tool for visualizing schema and associations

2010-02-05 Thread bill walton
HI Jeff, On Fri, 2010-02-05 at 20:00 +0100, Jeff Pritchard wrote: > I'm working with other people on a Rails project with a fairly "deep" > set of interconnected data. > > This is the first time I've tried to discuss data organization with > non-database-savvy folks (they know and understand the

[Rails] possible to refresh divs outside of an iframe? (general web dev question w rails-y flavors)

2010-02-05 Thread lunaclaire
I know this is a general question, but there is an aspect to rails dev that I hope makes it appropriate to post here... I'm building a FB App for a client using the Facebooker plugin. Because of the way FB restricts file uploads, I had a task to enable file uploads that required me to put an ifram

[Rails] Re: I'm having trouble with Routes II

2010-02-05 Thread Ralph Shnelvar
>> Well ... I upgraded. Jeez, that was hard. Devise changed several of >> its interfaces and it was a joy and a half tracking all(?) of them down. > > If you have comprehensive tests, then the tests tell you where things > changed. > > If you don't have comprehensive tests, write some *now*,

[Rails] Re: I'm having trouble with Routes II

2010-02-05 Thread Ralph Shnelvar
Marnen Laibow-Koser wrote: > Ralph Shnelvar wrote: > So ... I'm gonna go heads down and learn FireBug and see what the hell >> is going on. > > Firebug won't help unless this is a JavaScript issue, which it almost > certainly is not. FIrebug, apparently, has the ability to actually see the mess

[Rails] Re: Limit disk space allocation

2010-02-05 Thread Marnen Laibow-Koser
Sharagoz -- wrote: >> Much better than letting the user upload a file and then saying "Over quota >> > file deleted". > > You'd have to check the file on server side too, as javascript alone > cant guarantee that the file wont be uploaded anyway. To check on the > serverside the whole file h

[Rails] Re: PostgreSQL Test Database DNE for rake, does exist for ps

2010-02-05 Thread Marnen Laibow-Koser
Steve H. wrote: > Hello All, > > I'm relatively new to Ruby and Rails. I'm working with PostgreSQL > successfully as a development database server, and I want to use it in > production and testing as well. My development server is called > (myapp)_dev. My test database server is called (myapp)_tes

[Rails] Re: I'm having trouble with Routes II

2010-02-05 Thread Marnen Laibow-Koser
Ralph Shnelvar wrote: > Sharagoz -- wrote: >> You are using warden. Does the issue occur without warden? >> If not, the first thing you can do is to update to the latest version of >> warden (0.9.0). If that doesnt solve the problem, maybe post an issue at >> github if you feel it is warden relat

[Rails] Re: Ajax Update Status

2010-02-05 Thread Sharagoz --
> I made it work but without the id params which I need to find the > OrderLineItem. My bad, forgot to include that parameter. <%= select_tag(:sale_item, options_from_collection_for_select(@statuscodes, :id, :name), :onchange => remote_function(:update => 'repair_shop_selection', :url => {:contro

[Rails] Re: multiple "identical" tables

2010-02-05 Thread Marnen Laibow-Koser
Andreas S. wrote: > Ichiro Saga wrote: >> That's why I was thinking about breaking it into some >> smaller tables. > > Don't. A few 100k or million rows are nothing for a database. As long as > you set up an index for the school_id, splitting the students in > multiple tables has absolutely no

[Rails] Re: Ajax Update Status

2010-02-05 Thread Volkan ÇALIŞKAN
Hi thank you so much for the help. I made it work but without the id params which I need to find the OrderLineItem. How can I pass the id param to the function. In view it is sale_item.id. Should I use form_remote_tag again for this param because I need to pass :id and :status_id both. Also about

[Rails] Re: Store HTML select option value

2010-02-05 Thread Vincent P
Thanks all. Now I have the confidence to move forward. On Feb 5, 7:55 am, Matt Jones wrote: > On Feb 4, 10:06 pm,VincentP wrote: > > > > > > > In my app, each user may have one of the 30 predefined occupations. > > Each occupation is a string of about 30 characters.  Should I: > > >   a.  store

[Rails] Re: Is this SQL possible with Rails? How can I sanitize?

2010-02-05 Thread pharrington
On Feb 5, 2:09 pm, John Smith wrote: > I want to do something like this in Rails: > "SELECT *, COUNT(post_id) AS total FROM comments ... conditions" > > Is that SELECT possible in Rails. Ohterwise, I can use find_by_sql, but > i'm trying to avoid SQL injection and this SQL needs a parameter. Is >

[Rails] Is this SQL possible with Rails? How can I sanitize?

2010-02-05 Thread John Smith
I want to do something like this in Rails: "SELECT *, COUNT(post_id) AS total FROM comments ... conditions" Is that SELECT possible in Rails. Ohterwise, I can use find_by_sql, but i'm trying to avoid SQL injection and this SQL needs a parameter. Is there a way to sanitize this parameter? I'll ap

[Rails] tool for visualizing schema and associations

2010-02-05 Thread Jeff Pritchard
I'm working with other people on a Rails project with a fairly "deep" set of interconnected data. This is the first time I've tried to discuss data organization with non-database-savvy folks (they know and understand the data we're working with but are not familiar with sql concepts or rails assoc

[Rails] accessing reports externally through web interface

2010-02-05 Thread Daxal
Hey guys I was wondering if anyone kknows how to access the reports that jasper server creates externally through a website on another computeR? I am trying to access the reports from another server that i have. I am trying to get pyJasper working, ( i use python and django). http://github.com/hu

[Rails] Re: How to use a variable as a params hash key

2010-02-05 Thread reube...@gmail.com
Never mind I just figured out what I was doing. I didn't realized that the block variable I was passing in my code was itself a hash, so what I needed was: if params[:data][number[:number].to_s] == '1' Works now. Thanks! -Reuben On Feb 5, 12:20 pm, Frederick Cheung wrote: > On Feb 5, 6:18 pm

[Rails] Re: How to use a variable as a params hash key

2010-02-05 Thread Frederick Cheung
On Feb 5, 6:18 pm, "reube...@gmail.com" wrote: > I had tried that as well, but it didn''t make any difference. what did you try ? Fred > > On Feb 5, 11:13 am, Frederick Cheung > wrote: > > > > > On Feb 5, 4:44 pm, "reube...@gmail.com" wrote:> Not > > sure if I worded that Subject line corre

[Rails] Re: How to use a variable as a params hash key

2010-02-05 Thread reube...@gmail.com
I had tried that as well, but it didn''t make any difference. On Feb 5, 11:13 am, Frederick Cheung wrote: > On Feb 5, 4:44 pm, "reube...@gmail.com" wrote:> Not sure > if I worded that Subject line correctly... :P > > > Anyway, I want to be able to do something similar to the following > > when

[Rails] Re: controller code and uninitialized constants

2010-02-05 Thread pharrington
On Feb 5, 11:19 am, Craig White wrote: > YM4R_GM plugin... > > This controller code works but clearly has limitations... > >    map_1 = GMarker.new([...@salons[0].lat, @salons[0].lng]) >   �...@map.overlay_init(map_1) > > but I really need this in a loop... > >     for salon in @salons do >      

[Rails] Re: I'm having trouble with Routes II

2010-02-05 Thread Ralph Shnelvar
Sharagoz -- wrote: > You are using warden. Does the issue occur without warden? > If not, the first thing you can do is to update to the latest version of > warden (0.9.0). If that doesnt solve the problem, maybe post an issue at > github if you feel it is warden related. > http://github.com/hass

[Rails] Re: Get the object caller

2010-02-05 Thread Sharagoz --
> @user.contacts.is_contact?(user_contact_id) # This works like a charm It does? What's the content of the "is_contract?" function? It might be easier to help if you tell us what you're trying to achieve. What are you going to do once you know if the user have / doesn't have a contract with that

[Rails] http://planetrubyonrails.net/ now on Rails 3.0 beta

2010-02-05 Thread Anil Wadghule
http://planetrubyonrails.net/ now on Rails 3.0 beta -- Anil -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrai

[Rails] Re: multiple "identical" tables

2010-02-05 Thread Andreas S.
Ichiro Saga wrote: > That's why I was thinking about breaking it into some > smaller tables. Don't. A few 100k or million rows are nothing for a database. As long as you set up an index for the school_id, splitting the students in multiple tables has absolutely no advantage. -- Posted via http

[Rails] Re: multiple "identical" tables

2010-02-05 Thread Ichiro Saga
Marnen Laibow-Koser wrote: > Ichiro Saga wrote: >> Hi, there. >> I was wondering if it's possible to have one controller and view that >> has multiple tables. Let say there are 10 schools. Each school has a >> table to stores students' info. So one Student controller with 10 >> tables. Is it po

[Rails] Get the object caller

2010-02-05 Thread Augusto Ruibal (Shinta)
Let me explain I have these models class User < AR::Base has_many :contact end class Contact < AR::Base belongs_to :user belongs_to :user_contact_id, :class_name => "User", :foreign_key => "user_contact_id" # I have field called :user_contact_id who is the another user re

[Rails] Rails + Authlogic + OpenID

2010-02-05 Thread cndevelopment
Hi, I've been trying to add a feature to an existing rails app written using rails 2.3.4 and uses Authlogic for authentication to authenticate using openid. I added Authlogic-oid and ruby-openid and tried to get openid to work with both AX and sreg schemas. I followed many examples online (railsc

[Rails] Get a non instantiated object caller

2010-02-05 Thread Augusto Ruibal (Shinta)
Let me explain: class User < AR:Base has_many :contacts end class Contact < AR:Base belongs_to :user end -- 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-t...@googlegroups.com. T

[Rails] Re: How to use a variable as a params hash key

2010-02-05 Thread Frederick Cheung
On Feb 5, 4:44 pm, "reube...@gmail.com" wrote: > Not sure if I worded that Subject line correctly... :P > > Anyway, I want to be able to do something similar to the following > when processing form data: > Your problem here is that the hash keys are strings, not numbers Fred > 1..5.each do |num

Re: [Rails] How to use a variable as a params hash key

2010-02-05 Thread Philip Hallstrom
On Feb 5, 2010, at 8:44 AM, reube...@gmail.com wrote: Not sure if I worded that Subject line correctly... :P Anyway, I want to be able to do something similar to the following when processing form data: 1..5.each do |number| if params[:data][number] == '1'# <-- using block variable "

[Rails] How to use a variable as a params hash key

2010-02-05 Thread reube...@gmail.com
Not sure if I worded that Subject line correctly... :P Anyway, I want to be able to do something similar to the following when processing form data: 1..5.each do |number| if params[:data][number] == '1'# <-- using block variable "number" as a hash key does not seem to work... foo.ba

[Rails] Re: Define a string as a Model object

2010-02-05 Thread Frank_in_Tennessee
Works great now. Thank you. Modified Code: model_name = "User" @Model = model_name.constantize @Model.find(params[:id]).name On Feb 5, 10:32 am, Marnen Laibow-Koser wrote: > Frank_in_Tennessee wrote: > > Good morning, > > > I'm trying to dynamically define models. > > > This method #1 works: >

[Rails] Re: Edge Rails 3: Mongrel stuck in infinite loop, Unicorn missing uninitialized constant Rack::Runt

2010-02-05 Thread Java
Yeah, I already read that in your comment on the Rails weblog. Thanks a lot! With the Rails prerelease gem, Unicorn seems to be working again. Problem solved. On Feb 5, 3:45 pm, Juanma Cervera wrote: > Hi Jan. > I had the same problem, even with other two othes gems, and I resolved > the issue

Re: [Rails] Re: Define a string as a Model object

2010-02-05 Thread Rob Biedenharn
On Feb 5, 2010, at 11:16 AM, Sharagoz -- wrote: Try the eval method. For instance: classname = "Date" => "Date" eval(classname).today => Fri, 05 Feb 2010 With ActiveSupport you get constantize. irb> constantize("Date") => Date You can either look at the ActiveSupport implementation or t

[Rails] Re: Define a string as a Model object

2010-02-05 Thread Marnen Laibow-Koser
Frank_in_Tennessee wrote: > Good morning, > > I'm trying to dynamically define models. > > This method #1 works: > model_name = User > @Model = model_name > @Model.find(params[:id]).name > > This method #2 doesn't: > model_name = "User" > @Model = model_name > @Model.find(params[:id]).name > Of

[Rails] Re: undefined method ‘c’ error

2010-02-05 Thread John Merlino
Sharagoz -- wrote: > Can you show the full error message? In the code, I actually have: book = @student.books not book = @student.book This is because in Student model, I have has_many :books And named_scope: named_scope :for_test, :include => :books, :conditions => ["books.location_id

[Rails] controller code and uninitialized constants

2010-02-05 Thread Craig White
YM4R_GM plugin... This controller code works but clearly has limitations... map_1 = GMarker.new([...@salons[0].lat, @salons[0].lng]) @map.overlay_init(map_1) but I really need this in a loop... for salon in @salons do map_id += 1 map_id_ = "map_id_" + map_id.to_s map

[Rails] Re: Define a string as a Model object

2010-02-05 Thread Sharagoz --
Try the eval method. For instance: classname = "Date" => "Date" eval(classname).today => Fri, 05 Feb 2010 -- 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 r

[Rails] Re: undefined method ‘c’ error

2010-02-05 Thread Sharagoz --
Can you show the full error message? -- 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-t...@googlegroups.com. To unsubscribe from this group, send e

[Rails] Define a string as a Model object

2010-02-05 Thread Frank_in_Tennessee
Good morning, I'm trying to dynamically define models. This method #1 works: model_name = User @Model = model_name @Model.find(params[:id]).name This method #2 doesn't: model_name = "User" @Model = model_name @Model.find(params[:id]).name Anyone know how I can get method #2 to work? Is there s

[Rails] Re: Ajax Update Status

2010-02-05 Thread Sharagoz --
If the from only contains one field, then I suggest you forget about the "form_remote_tag" and just use a simple select field with an onchange attribute. <%= select_tag(:sale_item, options_from_collection_for_select(@statuscodes, :id, :name), :onchange => remote_function(:update => 'repair_sho

[Rails] Re: undefined method ‘c’ error

2010-02-05 Thread John Merlino
I changed it around: def student_test @student = Student.for_test.find(params[:id]) if params[:id] @student ||= Student.new run_sequence :testize end def test_finalize Student.transaction do if (params[:student]) and @student.update_attributes(params[:student]) @student.test! end room = Room.n

[Rails] Re: Store HTML select option value

2010-02-05 Thread Matt Jones
On Feb 4, 10:06 pm, Vincent P wrote: > In my app, each user may have one of the 30 predefined occupations. > Each occupation is a string of about 30 characters.  Should I: > >   a.  store this list of occupations in a mysql table and make > occupation_id a foreign key in the User model?  OR >  

[Rails] Re: " appearing in email

2010-02-05 Thread Jay Dev
Frederick Cheung wrote: > On Feb 4, 9:11�pm, Philip Hallstrom wrote: > >> > <%=h @notification.message %> >> >> Don't escape it. �h is an alias for html_escape which (for 2.3.2) does � >> this on the argument: > > > To be quite precise, only use h (that is, html_escape) if the output > is html.

[Rails] Re: basic email

2010-02-05 Thread Sharagoz --
A framework for sending emails is already built into Rails. Its called ActionMailer. http://wiki.rubyonrails.org/howtos/mailers -- 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 gr

[Rails] basic email

2010-02-05 Thread RubyonRails_newbie
Hi There, Anyone know of a nice basic way to send an email in ruby on rails? I'm thinking of allowing my site members to reccomend/invite friends by entering their email address and hitting send. At a guess, to begin with I think i'd need: def message(mail) subject mail[:message].subje

[Rails] Ajax Update Status

2010-02-05 Thread Volkan ÇALIŞKAN
Hello All, I am new to this Ajax update with form_remote_tag. I have a model so a table with order_line_items which has a order_line_item_status_code_id field. I am listing the pending items just fine in a list view with a dropdown select tag. I want to make update to Shipped with :onchange from

[Rails] Re: undefined method ‘c’ error

2010-02-05 Thread Robert Walker
John Merlino wrote: Given I see lots of issues with your code, I'm going to answer your question directly. > Book.c.id_num = room.id This line references a class method on the Book class named c. Something like this: class Book def self.c ... end end This could also be defined us

[Rails] Re: Edge Rails 3: Mongrel stuck in infinite loop, Unicorn missing uninitialized constant Rack::Runt

2010-02-05 Thread Juanma Cervera
Hi Jan. I had the same problem, even with other two othes gems, and I resolved the issue adding the gems in Gemfile and doing 'bundle install'. the gems were: gem "cgi_multipart_eof_fix" gem "fastthread" gem "mongrel_experimental" all of them are required in mongrel.rb with sentecese like Mong

[Rails] undefined method ‘c’ error

2010-02-05 Thread John Merlino
Hey all, I'm getting an undefined method 'c' error. I'm in the students controller, and I'm trying to find the book associated with the student, and then take that book's id_number and assign the room's id to it and then save the book: def student_test @student = (params[:id] and Student.find

[Rails] Edge Rails 3: Mongrel stuck in infinite loop, Unicorn missing uninitialized constant Rack::Runtime

2010-02-05 Thread Java
Hi, I wanted to try out Edge Rails 3 today and hit a serious problem trying to run mongrel. script/rails server mongrel just hangs. Interrupting and looking up the spot of the lockup revealed $LOAD_PATH.unshift 'projects/mongrel_experimental/lib/' Mongrel::Gems.require 'mongrel_experimental', ">

[Rails] Re: I'm having trouble with Routes II

2010-02-05 Thread Sharagoz --
You are using warden. Does the issue occur without warden? If not, the first thing you can do is to update to the latest version of warden (0.9.0). If that doesnt solve the problem, maybe post an issue at github if you feel it is warden related. http://github.com/hassox/warden/issues -- Posted v

[Rails] Re: Problem with Ajax Updater

2010-02-05 Thread Hemant Bhargava
Thanks resolved .. :) Sharagoz -- wrote: > The API will help > http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups

[Rails] Re: Plugin not found: 'attachment_fu'

2010-02-05 Thread Anil Bhat
Sharagoz -- wrote: > Hmm.. are you on Ruby 1.9? > It seems that there's a bug with Ruby 1.9 and Rails 2.3.4. See this > ticket: > https://rails.lighthouseapp.com/projects/8994/tickets/2018-ruby-19-compat-plugininstall-git-always-fails-in-ruby-19 > > You may have to upgrade to 2.3.5 or edge to sol

[Rails] Re: Store HTML select option value

2010-02-05 Thread Sharagoz --
I agree, option A is better. Maintaining a hardcoded array of 30 cells is cumbersome and less flexible. -- 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 rubyo

[Rails] Re: Plugin not found: 'attachment_fu'

2010-02-05 Thread Sharagoz --
Hmm.. are you on Ruby 1.9? It seems that there's a bug with Ruby 1.9 and Rails 2.3.4. See this ticket: https://rails.lighthouseapp.com/projects/8994/tickets/2018-ruby-19-compat-plugininstall-git-always-fails-in-ruby-19 You may have to upgrade to 2.3.5 or edge to solve it, or downgrade ruby to 1.

[Rails] Re: How to get the multiple selected Combobox value

2010-02-05 Thread Antony Nambikkai
Thanks Boss Its Working Thanks a Lot :-) Sharagoz -- wrote: > try: > name="user_names[]"> -- 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 rubyonra

[Rails] Re: Plugin not found: 'attachment_fu'

2010-02-05 Thread Anil Bhat
Sharagoz -- wrote: > The command looks correct, so I dont know whats wrong. > You could try installing it from github instead: > http://github.com/technoweenie/attachment_fu.git Still the same error: Plugin not found -- Posted via http://www.ruby-forum.com/. -- You received this message becaus

[Rails] Re: Plugin not found: 'attachment_fu'

2010-02-05 Thread Sharagoz --
The command looks correct, so I dont know whats wrong. You could try installing it from github instead: http://github.com/technoweenie/attachment_fu.git -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" g

[Rails] Re: Problem with Ajax Updater

2010-02-05 Thread Sharagoz --
The API will help http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html -- 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 g

Re: [Rails] Problem when migrating from rails 2.2.2 to rails 2.3.2 on linux SLES10 + apache 2

2010-02-05 Thread benbar
Hi, Thanks, it solved my problem. Although it looks like a hack to me. Isn't this a bug in mongrel_service? Should we report it? As of today I am using Ruby 1.8.7, Rail 2.3.5 and Rubygems 1.3.5. As for Mongrel: mongrel (1.1.5) and mongrel_service (0.3.4) and the problem still exists. -- View th

[Rails] Re: Limit disk space allocation

2010-02-05 Thread Sharagoz --
> Much better than letting the user upload a file and then saying "Over quota > > file deleted". You'd have to check the file on server side too, as javascript alone cant guarantee that the file wont be uploaded anyway. To check on the serverside the whole file has to be uploaded first befor

[Rails] Re: How to get the multiple selected Combobox value

2010-02-05 Thread Sharagoz --
try: -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+uns

Re: [Rails] Limit disk space allocation

2010-02-05 Thread Peter Hickman
How are you keeping track of what they have uploaded? If its in a database just include the sizes and when they upload something new you could just reject it if the new file will push them over quota. If you just have them in a directory per user then a quick scan over the directory should suffice.

[Rails] Limit disk space allocation

2010-02-05 Thread prabesh shrestha
I have a project management application . Anyone can sign up but as the space is limited, I need to limit the space for each user so they can't upload more than the allocated quota. How Can I allocate the fixed space for the created user? -- You received this message because you are subscribed to

[Rails] How to get the multiple selected Combobox value

2010-02-05 Thread Antony Nambikkai
<% users.each do |user| %> <%= user %> <% end %> How to get the multiple selected value in the controller. Now if I say " puts params[:user_name] " only the last selected value is coming . Plzz Help Thanks in advance, Antony -- Posted via http://www.ruby-forum.com/. -- You rece

Re: [Rails] Re: reservation system for hotel

2010-02-05 Thread Norm Scherer
Greg.. Take a look at OpenCampground.com for a gpl licensed app that is similar in requirements.  It is for campground space reservations but the general requirements are similar. Norm -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou

[Rails] Plugin not found: 'attachment_fu'

2010-02-05 Thread Anil Bhat
Hi, I tried to install 'attachment_fu' by the following command: script/plugin install http://svn.techno-weenie.net/projects/plugins/attachment_fu/ but its giving me the error: Plugin not found: ["http://svn.techno-weenie.net/projects/plugins/attachment_fu/ "] Please let me know how to install it

[Rails] Re: Skipping rescue handlers in dev mode

2010-02-05 Thread don buchanan
try this unless ActionController::Base.consider_all_requests_local rescue_from Exception, :with => :server_error rescue_from ActionController::RoutingError, ActiveRecord::RecordNotFound, :with => :not_found_error end You'll notice in config/development.rb you set consider_all_requests_local to

[Rails] Re: Encrypting the password using Authlogic

2010-02-05 Thread pjleonhardt
Try logging in as this user to verify? Authlogic will generate a unique salt for the user, and then hash the password with that salt. In this manner, you are never storing the plaintext passwords in the database (a very good thing!) and even if your database is exposed through some malicious attac