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

2010-04-26 Thread Greg Ma
Tony Augustine wrote: see i defined one method called campaign in the model and through a url i am tryong to pass two parameters like user_id and campaign_id into a method called mail_open_count. how i can pass 2 that method. def campaign(campaign) @campaign_id=

Re: [Rails] Re: Re: Best way to handle multiple tables to replace one bi

2010-04-26 Thread Colin Law
On 26 April 2010 02:08, Mike P. li...@ruby-forum.com wrote: Thank you Colin and Marnen for your repsonses. Marnen Laibow-Koser wrote: Colin Law wrote: On 25 April 2010 00:45, Mike P. li...@ruby-forum.com wrote: ... I think if people could just get over the don't optimize too early mantra,

Re: [Rails] exiting the function

2010-04-26 Thread Colin Law
On 26 April 2010 01:16, Mohammed Alenazi vb4...@gmail.com wrote: Hi I have this code  def destroy   �...@property = Property.find(params[:id])   IsAuthorized?(@property.user_id)   �...@property.destroy    respond_to do |format|      format.html { redirect_to(properties_url) }      

[Rails] Re: absolute beginner

2010-04-26 Thread octopushole
that was it. Thank you Peppe On 25 Apr, 00:52, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sat, Apr 24, 2010 at 6:49 AM, octopushole octopush...@gmail.com wrote: In the end, I was  expecting some sort of answer to the command #which ruby instead, there is no answer as nothing

Re: [Rails] Re: Re: Best way to handle multiple tables to replace one bi

2010-04-26 Thread Michael Pavling
On 26 April 2010 02:08, Mike P. li...@ruby-forum.com wrote: So, I'm trying to get the fuel before starting, not when I absolutely need it. I think it seems to some that what you might be doing is filling the back seats of your car with jerry cans full of fuel when all you're doing is popping

[Rails] /lib/rack/request.rb in my gem - is this reserved?

2010-04-26 Thread kb
Hi! I write a gem at the moment. The Gem need to register during the process in the rack middleware. So I make an folder rack inside my lib folder. I called the file request.rb because it keeps track of requests. So we speaking about the file /lib/rack/request.rb But even if I place an empty

[Rails] exception handling

2010-04-26 Thread Tom Mac
Hi I have controller edit action like def edit begin @user = User.find(params[:id]) rescue ActiveRecord::RecordNotFound logger.warn User with id #{current_user.id} tried to edit user with id #{params[:id]} render :file = #{RAILS_ROOT}/public/404.html else --- end

Re: [Rails] exception handling

2010-04-26 Thread Dhruva Sagar
Well you can specify a default page / controller action to perform for unmatched routes as well...so if the route doesn't exist it shows a much user friendly page instead of the rails error message Thanks Regards, Dhruva Sagar. On Mon, Apr 26, 2010 at 13:52, Tom Mac li...@ruby-forum.com

[Rails] Re: exception handling

2010-04-26 Thread Tom Mac
Hi Thanks. But how can I handle in code? Tom -- 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

[Rails] add a new format to locales

2010-04-26 Thread inriz
hello list, i try to add a new format to my locales file de.yml i looks like that: de: number: square_meter: format: unit: 'm²' format: %n %u precision: 2 separator: ',' delimiter: '.' after that i've copied the number_to_currency method to

[Rails] Re: hostingrails.com appears to have had an ownership change.

2010-04-26 Thread Julia
On Apr 22, 8:28 pm, minka beesupp...@beelucid.com wrote: Uggh, this happened to be me before, my site trashed when the host had business problems. I hope it won't be that bad. It seems Jumpline has taken over hostingrails and it also seems that there have been support transition problems.

[Rails] Philosophical question about MVC

2010-04-26 Thread Antonio Tapiador del Dujo
Hi folks, I am working on Station, a Rails Engine [1] that supports authorization among other things. Using Station, you can ask a model about authorization, for example: post.authorize?(permission, :to = current_user) My question rises when doing automatic Model - Controller mapping.

[Rails] Re: /lib/rack/request.rb in my gem - is this reserved?

2010-04-26 Thread Frederick Cheung
On Apr 26, 8:57 am, kb ban...@gmail.com wrote: It seems like something does require a module Rack; class Request; inside of this file. What is the cause of this? Where can I find ressources concerning this issue? You're probably shadowing rack's own request.rb Fred This works perfectly

[Rails] Re: App to Pick up application release from Git/Capistrano?

2010-04-26 Thread Owain
so here it is my solution; /app/config/initializers/revision.rb filename = File.expand_path('REVISION', RAILS_ROOT) REVISION = File.exist?(filename) ? File.read(filename) : `cd #{RAILS_ROOT} git rev-parse HEAD`.strip /app/views/layout/application.html.erb %- unless production? % p

[Rails] Rails I18n

2010-04-26 Thread Yiannis
I was just wondering about locales and .yml files. Is it better to store the multilanguage strings in .yml files than in databases? And if yes, why? I was also wondering how rails are loading this files (for example, I have 4 languages in my web app, each has her own .yml file, will my rails app

Re: [Rails] Rails I18n

2010-04-26 Thread Dhruva Sagar
Yes it is better to store the multilanguage strings in the .yml files. Why you ask, well are you going to have all your record entries repeat one for each language you intent to support ?? Do you think that would be a good idea ?? The database should have single values which the .yml files will

[Rails] ActionController::RoutingError

2010-04-26 Thread Felix
Hi All, I am just learning Rails. I had encountered a routing error, though I think I have specified the correct rules in the routing.rb. I have attached the code. Please help routing.rb map.connect ':controller/:action' map.connect ':controller/:action/:id' map.connect

[Rails] Re: exiting the function

2010-04-26 Thread Mohammed Alenazi
Conrad I did you suggested but I got this message Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to

[Rails] Re: Rails I18n

2010-04-26 Thread Marnen Laibow-Koser
Dhruva Sagar wrote: Yes it is better to store the multilanguage strings in the .yml files. Why you ask, well are you going to have all your record entries repeat one for each language you intent to support ?? Do you think that would be a good idea ?? Do you think this is a bad idea?

[Rails] Re: Re: Re: Best way to handle multiple tables to replace on

2010-04-26 Thread Marnen Laibow-Koser
Michael Pavling wrote: On 26 April 2010 02:08, Mike P. li...@ruby-forum.com wrote: So, I'm trying to get the fuel before starting, not when I absolutely need it. I think it seems to some that what you might be doing is filling the back seats of your car with jerry cans full of fuel when all

[Rails] Re: Ruby randomly converting quotes to html

2010-04-26 Thread Marnen Laibow-Koser
Fernando Perez wrote: Please disregard my previous message. I forgot textilize was kicking in. Glad you found the problem. Now get your JS out of the HTML and into a separate file. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/.

Re: [Rails] Re: Rails I18n

2010-04-26 Thread Dhruva Sagar
Thanks Regards, Dhruva Sagar. On Mon, Apr 26, 2010 at 17:39, Marnen Laibow-Koser li...@ruby-forum.comwrote: Dhruva Sagar wrote: Yes it is better to store the multilanguage strings in the .yml files. Why you ask, well are you going to have all your record entries repeat one for each

[Rails] Re: help finding database items that lost parent item

2010-04-26 Thread Marnen Laibow-Koser
Scott Kulik wrote: Frederick Cheung wrote: On Apr 25, 1:57�am, Scott Kulik li...@ruby-forum.com wrote: updating the database when a users has problems with their private messages page. I'm wondering if someone knows a good way I could scan the the pm's table and delete messages that no

[Rails] Sessions

2010-04-26 Thread Rajkumar Surabhi
hi all, in my application, i have login form. while login into the application iam maintaning the details in session. i want to remove the stale sessions and while removing the stale sessions i want to perform some operattions on database . how to do this. Regards, Rajkumar -- Posted via

[Rails] Re: Re: Rails I18n

2010-04-26 Thread Marnen Laibow-Koser
Dhruva Sagar wrote: Thanks Regards, Dhruva Sagar. On Mon, Apr 26, 2010 at 17:39, Marnen Laibow-Koser li...@ruby-forum.comwrote: Dhruva Sagar wrote: Yes it is better to store the multilanguage strings in the .yml files. Why you ask, well are you going to have all your record

[Rails] Re: Conditionally adding a link to a form -- how?

2010-04-26 Thread RichardOnRails
Hi Colin, In the _controller_ method that is rendering the page that has the conditional link displayed set a variable @show_new_expense_page = true at the point in the code where you know that you wish to show the link. In the view then just use if @show_new_expense_page on the link

Re: [Rails] Re: exiting the function

2010-04-26 Thread Colin Law
On 26 April 2010 13:09, Mohammed Alenazi vb4...@gmail.com wrote: Conrad I did you suggested but I got this message Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither

[Rails] [JOBS] [RAILS]

2010-04-26 Thread ricardo porteus
Hi, we are looking for a ROR / Actionscript Master to join our design agency www.recodemedia.com and work remotely on some very exciting web projects. We want a partner will will work and develop and grow with us. We have 2/3 projects that require a fresh outlook, think Basecamp/ Dropbox type of

Re: [Rails] Re: Re: Re: Best way to handle multiple tables to replace on

2010-04-26 Thread Michael Pavling
On 26 April 2010 13:16, Marnen Laibow-Koser li...@ruby-forum.com wrote: And you *can't* know.  The app doesn't exist yet, so you don't know what your usage patterns will actually be. I agree totally.. but I was being nice to the OP; and he may prefer to make his own mistakes to learn from (or

[Rails] Re: Conditionally adding a link to a form -- how?

2010-04-26 Thread RichardOnRails
Hi Marnen, Can I suggest that you supplement this with automated tests and version control? Absolutely! That's definitely on my agenda. But this (first) Rails app is intended to automate a substantial part of burden my son faces in managing his small business. So, I'm focused on getting

Re: [Rails] Re: Conditionally adding a link to a form -- how?

2010-04-26 Thread Colin Law
On 26 April 2010 13:31, RichardOnRails richarddummymailbox58...@uscomputergurus.com wrote: Hi Colin, In the _controller_ method that is rendering the page that has the conditional link displayed set a variable @show_new_expense_page = true at the point in the code where you know that you

Re: [Rails] Re: Re: Rails I18n

2010-04-26 Thread Dhruva Sagar
On Mon, Apr 26, 2010 at 17:58, Marnen Laibow-Koser li...@ruby-forum.comwrote: Dhruva Sagar wrote: Thanks Regards, Dhruva Sagar. On Mon, Apr 26, 2010 at 17:39, Marnen Laibow-Koser li...@ruby-forum.comwrote: Dhruva Sagar wrote: Yes it is better to store the multilanguage

[Rails] Re: Conditionally adding a link to a form -- how?

2010-04-26 Thread Marnen Laibow-Koser
RichardOnRails wrote: Hi Marnen, Can I suggest that you supplement this with automated tests and version control? Absolutely! That's definitely on my agenda. But this (first) Rails app is intended to automate a substantial part of burden my son faces in managing his small business.

[Rails] Re: Conditionally adding a link to a form -- how?

2010-04-26 Thread RichardOnRails
Yes. I think you are totally missing how the Web works :-) Funny, but oh so true! The params hash represents name/value pairs passed from a client (browser, typically) to your server, either as a GET request's query string, or as body parts of a POST request. This is definitely one of the

[Rails] Re: Logging in Production on Network Solutions

2010-04-26 Thread jrq
I've managed to get some output to the production.log file. By default Network Solutions creates the log files with 644, I think it needs 666. It's hard to tell since there seems to be a buffer that has to fill before the write is actually executed. At least I can see why the app's crashing.

[Rails] Re: Conditionally adding a link to a form -- how?

2010-04-26 Thread RichardOnRails
Something is still not working as you think it is. You're right about that, especially the practice of setting @xxx in one controller and (correctly) referencing it's value in second (unrelated by hierarchy) controller. I think that can only work by meta-programming magic. I'm going to post a

[Rails] nested resources and controllers: I think I'm down the wrong path

2010-04-26 Thread Grary
Hi, I'm new to nested resources. I'm surprised to find that to make my code work I need to retrieve the parent model in my RESTful controllers for my dependencies. So, for example, let's say A has_one B. In controller B I seem to need to refer to parent A, for example: @b =

[Rails] Re: nested resources and controllers: I think I'm down the w

2010-04-26 Thread Marnen Laibow-Koser
Grary Stimon wrote: Hi, I'm new to nested resources. I'm surprised to find that to make my code work I need to retrieve the parent model in my RESTful controllers for my dependencies. So, for example, let's say A has_one B. In controller B I seem to need to refer to parent A, for

Re: [Rails] Re: Conditionally adding a link to a form -- how?

2010-04-26 Thread Hassan Schroeder
On Mon, Apr 26, 2010 at 7:05 AM, RichardOnRails richarddummymailbox58...@uscomputergurus.com wrote: put it in session I'm ready to add some version of an authenticated user,  Authlogic, I think.  That should give me a session as my repository The session concept doesn't imply authentication

[Rails] Re: help finding database items that lost parent item

2010-04-26 Thread Scott Kulik
Marnen Laibow-Koser wrote: Scott Kulik wrote: Frederick Cheung wrote: On Apr 25, 1:57�am, Scott Kulik li...@ruby-forum.com wrote: updating the database when a users has problems with their private messages page. I'm wondering if someone knows a good way I could scan the the pm's table and

[Rails] Group countries per continent

2010-04-26 Thread Vincent Bakker
Hi guys, I have a table that has a country column (:string). Now I need to group together all the countries that are in Europe. Any ideas on how I would approach this? (quickfix wise) Regards, Vincent -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] Re: nested resources and controllers: I think I'm down the w

2010-04-26 Thread Grary
Marnen, Here is the expression of a representative model association in my project: Parent ... has_one :dependent Dependent ... belongs_to :parent Here is my complementing route: map.resources :parents, :has_one = [:dependent, :dependent_2, ... Here is a change I'd lately made to a

[Rails] Re: help finding database items that lost parent item

2010-04-26 Thread Marnen Laibow-Koser
Scott Kulik wrote: [...] Then please spend some quality time with an SQL reference. If you can't write simple joins, then you are not yet ready to develop Web applications that use SQL databases. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org Wow, that's

[Rails] Re: Problems installing mongrel in Ruby 1.9.1 on Mac OS

2010-04-26 Thread Pete Gamache
Alpha Blue wrote: As a note, this works on all OS versions (windows/linux/mac). Just browse to those listings (the notes above are for linux but you can translate them easy enough. Just find the files and change the lines as noted above, and it will work for you. I've accomplished this

[Rails] Re: nested resources and controllers: I think I'm down the w

2010-04-26 Thread Marnen Laibow-Koser
[Please quote when replying.] Grary Stimon wrote: Marnen, Here is the expression of a representative model association in my project: Parent ... has_one :dependent Dependent ... belongs_to :parent Here is my complementing route: map.resources :parents, :has_one = [:dependent,

Re: [Rails] Re: Rails3 + PostgreSQL

2010-04-26 Thread Greg Donald
On Sat, Apr 24, 2010 at 7:56 PM, Ginty stephen.f.mcgi...@gmail.com wrote: Maybe the fact you have the others installed is part of the problem That was the problem. It works fine when pg is the only gem installed. Thanks. -- Greg Donald destiney.com | gregdonald.com -- You received this

[Rails] Re: nested resources and controllers: I think I'm down the w

2010-04-26 Thread Grary
I can't recreate the problem, somehow, let's consider the question dead until I can. Thanks, Grar On Apr 26, 11:06 am, Marnen Laibow-Koser li...@ruby-forum.com wrote: [Please quote when replying.] Grary Stimon wrote: Marnen, Here is the expression of a representative model association

[Rails] custom db rake task gives 'development database not configured'

2010-04-26 Thread David van Geest
Hi all, I'm trying to write a simple custom rake task to easily delete some database records. However when I run it, I get an error 'development database is not configured'. Here's the code: lib/tasks/custom.rake require 'activerecord' namespace :db do task :delete_sessions do sessions

Re: [Rails] Group countries per continent

2010-04-26 Thread Hassan Schroeder
On Mon, Apr 26, 2010 at 7:51 AM, Vincent Bakker li...@ruby-forum.com wrote: I have a table that has a country column (:string). Now I need to group together all the countries that are in Europe. Any ideas on how I would approach this? (quickfix wise) 1) Add continent as an attribute to

[Rails] Re: Rails I18n

2010-04-26 Thread Yiannis
TSagar I am not sure I quite understand your example, it will translate the string Role in each language and there are many approaches to do a multilingual database design. I would make a database multilanguage design by setting each language in separate table, this approach will be normalized.

Re: [Rails] Re: Re: Rails I18n

2010-04-26 Thread Colin Law
On 26 April 2010 13:55, Dhruva Sagar dhruva.sa...@gmail.com wrote: ... eg.) Lets say I have a User model and each user has a 'role' as a column. So if I want to internationalize the value of the 'Role', you propose that it should be done using the database ? I imagine so then for

[Rails] Re: Ordering by associated columns (pleeease help)

2010-04-26 Thread Sumeet Panchal
join will work, even :include will work. but this reduce performance for query. On Apr 23, 12:01 pm, Anubhaw Prakash li...@ruby-forum.com wrote: Sumeet Panchal wrote: Hi, I am stuck pretty bad please help. any comment is helpful. I have say three models Customer(fields are id, name,

[Rails] Re: custom db rake task gives 'development database not configured'

2010-04-26 Thread Frederick Cheung
On Apr 26, 4:34 pm, David van Geest dav...@spindance.com wrote: I can still do other rake db tasks, such as drop, create, and migrate, so I know that my config/database.yml is OK. Any ideas?  Thanks. Taking a look at databases.rake in rails itself, I think you want to depend on the

[Rails] Re: Find distinct values in an array of database results

2010-04-26 Thread Vincent M.
Sometimes you're not querying a database (for example a REST service that returns a json result). Specially in web applications. On Apr 15, 12:15 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Christophe Decaux wrote: If I may jump in, I'm interested in understanding why you would do this

Re: [Rails] Re: Rails3 + PostgreSQL

2010-04-26 Thread Carina Brito
Hi.. i called Carina... i was either problem installed its gem.. 2010/4/26 Greg Donald gdon...@gmail.com On Sat, Apr 24, 2010 at 7:56 PM, Ginty stephen.f.mcgi...@gmail.com wrote: Maybe the fact you have the others installed is part of the problem That was the problem. It works fine when

[Rails] lots of views for a single controller

2010-04-26 Thread richardsugg
I'm new to rails and would like some guidance on how to proceed. It's kind of hard to hold the entire framework in my head and work through an issue, but if you can give me the high-level concepts, I should be able to work through this. I have a customer database where I store information such

[Rails] uneditable text input field

2010-04-26 Thread ES
Does anyone know if it is possible to create an uneditable text input field using the form tag helpers? -- 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

[Rails] Re: rails 3 b2+nginx report error no such file to load --

2010-04-26 Thread Bobby Marko
Jun Sha wrote: Hi, Conrad I find method of solution about no such file to load -- rack http://rvm.beginrescueend.com/integration/passenger/ = in /opt/nginx/conf/nginx.conf passenger_ruby /home/wayne/.rvm/bin/passenger_ruby; instead of

[Rails] Re: About your application's environment URL not found

2010-04-26 Thread Henry Oss
Thank you both very much. Putting it in sites available did the trick. Henry -- 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] Re: uneditable text input field

2010-04-26 Thread Frederick Cheung
On Apr 26, 6:13 pm, ES emsto...@gmail.com wrote: Does anyone know if it is possible to create an uneditable text input field using the form tag helpers? You should be able to set the disabled or readonly attribute (these aren't the same - make sure you use the one most appropriate for your

[Rails] Memcache session store in Rails 3

2010-04-26 Thread tlx
Hi everyone, I found a guide to config session store using memcache-client in Rails 2.x. However, it seems config files were changed in Rails 3, and I'm quite confused how to make these things work on Rails 3. Googled and found no guide on configuring memcache session in Rails 3. Thanks for

[Rails] woriking under webrick but not under passenger

2010-04-26 Thread Nenad Cuturic
Hi! I have just added login feature to my rails application (followed the instruction from (Agile Web Development with Rails) but now I am getting strange errors (looks to me like some kind of routing problem) under the passenger/apache. The error is: 500 Internal Server Error The server

[Rails] Re: uneditable text input field

2010-04-26 Thread ES
nice, thanks! On Apr 26, 7:18 pm, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 26, 6:13 pm, ES emsto...@gmail.com wrote: Does anyone know if it is possible to create an uneditable text input field using the form tag helpers? You should be able to set the disabled or readonly

[Rails] Re: Rails internals ?.

2010-04-26 Thread Dani Dani
Thank you to all for your entries and time. Dani -- 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

[Rails] form id

2010-04-26 Thread ES
Is there a way to get the id attribute of a object's form in its own form? For example saying link_to... :id= f.id ? -- 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.

[Rails] ruby:0:in `require': no such file to load -- oci8 (LoadError)

2010-04-26 Thread kimda
Hi, I am been struggling with oracle db connection from RoR app in my new windows machine which I was able to it n other windows machine a couple of years ago. I installed everything (ruby, rubygem and oracle instant client and ran ruby oci8 command ) and my RoR web app runs ok except oracle DB

[Rails] id of new object dynamically created in a nested form

2010-04-26 Thread ES
In my nested form I have a link to open a popup with selections. When a selection is made, the popup closes and the selection is added to a text box. Because I have objects that can be dynamically created in the form I can't just use the id of the object to assign the selection to the input text

[Rails] Re: Philosophical question about MVC

2010-04-26 Thread Robert Walker
Antonio Tapiador del Dujo wrote: Hi folks, I am working on Station, a Rails Engine [1] that supports authorization among other things. Using Station, you can ask a model about authorization, for example: post.authorize?(permission, :to = current_user) My question rises when doing

[Rails] Link_to delete action

2010-04-26 Thread Greg Ma
Hi, I am trying to generate a link to delete a relationship, so I've done the code bellow. THis is the full code, the part for deleting the relationship is at the bottom of the code. I am using a restful controller % unless item.user_participe?(current_user) % %form_for Participant.new do |f| %

[Rails] Re: Re: Re: Rails I18n

2010-04-26 Thread Marnen Laibow-Koser
Colin Law wrote: On 26 April 2010 13:55, Dhruva Sagar dhruva.sa...@gmail.com wrote: ... eg.) Lets say I have a User model and each user has a 'role' as a column. So if I want to internationalize the value of the 'Role', you propose that it should be done using the database ? I imagine so

[Rails] Re: Find distinct values in an array of database results

2010-04-26 Thread Marnen Laibow-Koser
[Please quote when replying, so we know what in particular you're responding to.] Vincent M. wrote: Sometimes you're not querying a database (for example a REST service that returns a json result). Specially in web applications. True. But where you have a database, you should use it. :)

[Rails] Re: lots of views for a single controller

2010-04-26 Thread Marnen Laibow-Koser
richardsugg wrote: I'm new to rails and would like some guidance on how to proceed. It's kind of hard to hold the entire framework in my head and work through an issue, but if you can give me the high-level concepts, I should be able to work through this. Have you read the Rails Guides?

[Rails] Re: uneditable text input field

2010-04-26 Thread Marnen Laibow-Koser
Frederick Cheung wrote: On Apr 26, 6:13�pm, ES emsto...@gmail.com wrote: Does anyone know if it is possible to create an uneditable text input field using the form tag helpers? You should be able to set the disabled or readonly attribute (these aren't the same - make sure you use the one

Re: [Rails] Re: Find distinct values in an array of database results

2010-04-26 Thread Franz Strebel
On Mon, Apr 26, 2010 at 10:42 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: [Please quote when replying, so we know what in particular you're responding to.] Vincent M. wrote: Sometimes you're not querying a database (for example a REST service that returns a json result). Specially in

[Rails] Re: Blog ruby on rails/Django Fastes made

2010-04-26 Thread Marnen Laibow-Koser
Bob 101155 wrote: Hi I've got a little quetion. For school I've to make a blog either using ruby on rails or Django. I've to do this at home, install the languages, etc. I've to make screenshots while running the language and blog. tell why I chose that language and the files i made for the

[Rails] Re: ruby:0:in `require': no such file to load -- oci8 (LoadError)

2010-04-26 Thread Frederick Cheung
On Apr 26, 6:26 pm, kimda tkk...@gmail.com wrote: Hi, I am been struggling with oracle db connection from RoR app in my new windows machine which I was able to it n other windows machine a couple of years ago. I installed everything (ruby, rubygem and oracle instant client and ran ruby

[Rails] Scott Hughes is out of the office.

2010-04-26 Thread Scott Hughes
I will be out of the office starting April 26, 2010 and will not return until May 3, 2010. Please direct any questions you have to Brian Esler or Andy Brymer in my absence. Thank You -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To

Re: [Rails] Re: custom db rake task gives 'development database not configured'

2010-04-26 Thread David van Geest
Frederick Cheung wrote: On Apr 26, 4:34 pm, David van Geest dav...@spindance.com wrote: I can still do other rake db tasks, such as drop, create, and migrate, so I know that my config/database.yml is OK. Any ideas? Thanks. Taking a look at databases.rake in rails itself, I think you

[Rails] Re: Rails 3 Phusion Passenger - Ruby (Rack) application could not be started

2010-04-26 Thread dmack
On Apr 25, 4:40 pm, Paul Jonathan Thompson rails...@gmail.com wrote: My environment is:  FreeBSD 6.4  Ruby1.9.1p378  Passenger  2.2.11  Rails3.0.0.beta3 I did, it then complained that it could not find config.ru Regards, Paul Thompson. Ack. Sounds like a different problem

[Rails] Understand rails routing

2010-04-26 Thread got_nil
Hello, I'm new to rails so this will be a noob question. Let's say I scaffold sth. named foos. Rails generates a controller named foos_controller.rb with index, show, new, edit, create, update and destroy. The routes.rb contains map.resources :foos map.connect ':controller/:action/:id'

[Rails] Re: ruby:0:in `require': no such file to load -- oci8 (LoadError)

2010-04-26 Thread kimda
After this command, I still get same error. gem install ruby-oci8 -v 2.0.3 my oracle connect identifier works fine in another windows machine that is prod env. So, I assume oracle stuff is ok. On Apr 26, 5:10 pm, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 26, 6:26 pm, kimda

[Rails] Re: Understand rails routing

2010-04-26 Thread Frederick Cheung
On Apr 26, 10:58 pm, got_nil awesomedomainsh...@googlemail.com wrote: But, what happens when I go to /foos/1/edit. This is not matching map.connect ':controller/:action/:id' since action and id are switched. Is scaffold doing some magic here, that I can't find in the sources? When I add a

[Rails] Re: ruby:0:in `require': no such file to load -- oci8 (LoadError)

2010-04-26 Thread Frederick Cheung
On Apr 26, 11:08 pm, kimda tkk...@gmail.com wrote: After this command, I still get same error. gem install ruby-oci8 -v 2.0.3 When I said require rubygems I meant that you need to do -rrubygems as well as -roci8 my oracle connect identifier works fine in another windows machine that is

[Rails] accessing module from controller

2010-04-26 Thread Dave Preschel
I know this is probably something simple that I'm missing. I am trying to call a function that is in a module in /lib, but the controller doesnt seem to be finding it. I have: lib/siteopen.rb: module Siteopen def is_site_open() return 1 end end and in a controller: class

[Rails] Re: accessing module from controller

2010-04-26 Thread Frederick Cheung
On Apr 26, 11:27 pm, Dave Preschel li...@ruby-forum.com wrote: I know this is probably something simple that I'm missing. I am trying to call a function that is in a module in /lib,  but the controller doesnt seem to be finding it. If you want to be able to use the methods from a module like

[Rails] [ANN] ice_cube 0.3.1

2010-04-26 Thread John Crepezzi
== About ice_cube ice_cube is a time recurrence library for Ruby. The API is modeled after iCalendar repeating events, making it very easy to describe complex rules and conjunctions in pure Ruby. ice_cube's power lies in its ability to specify multiple rules - and easily query and expand them.

[Rails] Re: Logging in Production on Network Solutions

2010-04-26 Thread jrq
Here's what I think happened: Network Solutions went into a complete tailspin over this recent hack of their file servers, and ran around altering permissions on directories and files left, right, and centre. All of this resulted in some very confused, and messed up applications. There's a

[Rails] Re: accessing module from controller

2010-04-26 Thread Dave Preschel
Frederick Cheung wrote: If you want to be able to use the methods from a module like that you need to include the module (or extend it if you just want to add the methods to one instance). require (which is unnecessary here) just asks ruby to load the file. Fred That was it! Thanks,Dave

[Rails] Re: ruby:0:in `require': no such file to load -- oci8 (LoadError)

2010-04-26 Thread kimda
When I said require rubygems I meant that you need to do -rrubygems as well as -roci8 hm..I am confusing. do you mean updating gems? If so, I just did and still get same error. Does oracle require any environment variables or configuration files etc ? I know nothing about oracle

[Rails] UBUNTU 10.04 and rails?

2010-04-26 Thread David Zhu
I'm currently running ubuntu 9.10 karmic , and i know that 10.04 is coming out this week. I'm currently in the middle of a project, and I'm not sure if Rails still works with 10.04. Also, do i lose all my database tables, files, ruby, rails, etc if i update? Thanks -- You received this

[Rails] Re: Re: Find distinct values in an array of database results

2010-04-26 Thread Marnen Laibow-Koser
Franz Strebel wrote: On Mon, Apr 26, 2010 at 10:42 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: [Please quote when replying, so we know what in particular you're responding to.] Vincent M. wrote: Sometimes you're not querying a database (for example a REST service that returns a

[Rails] Re: UBUNTU 10.04 and rails?

2010-04-26 Thread Marnen Laibow-Koser
David Zhu wrote: I'm currently running ubuntu 9.10 karmic , and i know that 10.04 is coming out this week. I'm currently in the middle of a project, and I'm not sure if Rails still works with 10.04. I'd be surprised if it didn't. Also, do i lose all my database tables, files, ruby,

Re: [Rails] Re: Re: Rails I18n

2010-04-26 Thread Dhruva Sagar
@Colin Ahh yes of course, well my example was just to demonstrate the usage of i18n. Roles should of course me a separate table, but then again, the separate table will have a role column right :). @Yiannis Using multiple tables for the purpose of internationalization to me seems like such an

[Rails] Looking for JQuery/JQueryUI 'NInja' - willing to pay right individual

2010-04-26 Thread dekhaus
Hi All I'm looking for a JQuery 'Ninja' - someone with extensive experience using JQueryUI - specifically the JQueryUI Widgets (Tab, Dialog, Button etc ...). I'm interested in paying someone to help me use this awesome technology efficiently and bypass any 'speed bumps' learning

[Rails] action_mailer - No Errors, but no emails sent

2010-04-26 Thread Brent
Hello, I am trying to mail messages. I'm using virtually the same code I did locally, and I got it to work (using Gmail). But not that I test it from my hosting it won't work. Everything is setup properly. I can even login with Telnet and send mail from the same username. Rails won't even give

Re: [Rails] action_mailer - No Errors, but no emails sent

2010-04-26 Thread Dhruva Sagar
In your ROOT/config/environements/development.rb or other approriate .rb file put this line : config.action_mailer.raise_delivery_errors = true you should see errors in your log files post this is done, that should give you a better idea as to what's going wrong. It could be as simple as wrong

Re: [Rails] Re: Re: Rails I18n

2010-04-26 Thread Walter McGinnis
There isn't really one answer to where to store different language values for a string. It depends on the case. There are two main ones. For static strings (text in templates, error messages), using locales/*.yml makes sense as they are easy to edit and use. They are called frequently and

Re: [Rails] Re: Re: Rails I18n

2010-04-26 Thread Dhruva Sagar
Thanks a lot for that, that's a good reply :) On Tue, Apr 27, 2010 at 07:02, Walter McGinnis walter.mcgin...@gmail.comwrote: There isn't really one answer to where to store different language values for a string. It depends on the case. There are two main ones. For static strings (text in

[Rails] Re: action_mailer - No Errors, but no emails sent

2010-04-26 Thread Brent
I have that in there, but still no errors. This is my log: Processing PagesController#say_hello (for ___ at 2010-04-26 18:00:48) [POST] Parameters: {action=say_hello, authenticity_token=6Shi6Wa/ 6dYjA1UJNPx74SVLofVmD5LEhTvZ9rJoeNY=, contact={name=we, content=rr,

Re: [Rails] UBUNTU 10.04 and rails?

2010-04-26 Thread Vladimir Rybas
I don't update my Ubuntu during 6 months between releases. It's easier for me to format HDD and setup everything from scratch in one day. When you do automatic updates, or release update without reinstallation - the strange things could happen. I always had to fix something with my hardware after

  1   2   >