[Rails] Re: form_for helper for nested resources

2010-02-16 Thread Seirie
Ahh, got the first issue as well. For anyone that's interested, I was able to get my desired result with: % form_for Comment.new, :url = category_post_comments_path(:category_id = @category, :post_id = @post) do |f| % On Feb 16, 2:41 am, Seirie sei...@gmail.com wrote: Alright, I figured out the

[Rails] Re: form_for helper for nested resources

2010-02-16 Thread Seirie
This also works, and seems a lot more elegant: % form_for [...@course, @discussion, Message.new] do |f| % On Feb 16, 2:59 am, Seirie sei...@gmail.com wrote: Ahh, got the first issue as well. For anyone that's interested, I was able to get my desired result with: % form_for Comment.new, :url

[Rails] searchlogic incompatible with error_messages

2010-02-16 Thread Ease Bus
Is searchlogic incompatible with error_messages? I am following the example at http://railscasts.com/episodes/176-searchlogic. If I add %= f.error_messages % to the form I get the error below: Showing index.html.erb where line #2 raised: undefined method `errors' for #Class:0x1035a7a18

[Rails] Re: Designer - Introduction

2010-02-16 Thread AS Creative Design
Hi Jon, Thanks for the welcome and kind words. It's not always easy to reach a design solution... what is it they say... 10% inspiration and 90% perspiration! which is very true!! Thanks again, Andy On Feb 15, 11:44 am, Jon Cox li...@ruby-forum.com wrote: AS Creative Design wrote: Hi

[Rails] cached_model ActiveRecord

2010-02-16 Thread heo
Is CachedModel still a good candidate for model-based caching? Is there any other that is actively supported and works well with Rails 2.3 that I can try? -- 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] best way to select uncommon elements from array

2010-02-16 Thread rahtha
I have two arrays and i want to get all items which are NOT common to both, so basically if i have two arrays A and B, i want all elements in A that are not in B. what is the best way to do this apart from using two nested loops. thanks rahtha -- You received this message because you are

[Rails] Controller Error

2010-02-16 Thread prasath venkatraman
Sorry for the newbie question i created a controller and a action for my rails but when i load on my browser am gettin a message like this We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly. Thanks in advance -- You received this

[Rails] Re: best way to select uncommon elements from array

2010-02-16 Thread Frederick Cheung
On Feb 16, 7:10 am, rahtha rahul.that...@gmail.com wrote: I have two arrays and i want to get all items which are NOT common to both, so basically if i have two arrays A and B, i want all elements in A that are not in B. what is the best way to do this apart from using two nested loops. A -

[Rails] Re: require 'hirb' at the start of every console

2010-02-16 Thread davidakachaos
On 16 feb, 07:27, Vincent P ease...@gmail.com wrote: How do I make the script/console run the following commands automatically at the beginning whenever it starts? ActiveRecord::Base.logger = Logger.new(STDOUT) require 'hirb' Hirb::View.enable I try putting these in .irbrc but it does not

[Rails] Re: login with twitter, yahoo, google, facebook credentials......

2010-02-16 Thread v0n0
Try with Devise and its strategies. http://github.com/plataformatec/devise/tree/master On Feb 16, 5:16 am, Me chabg...@gmail.com wrote: Does anyone know how to go about giving an option to login to a website with twitter, yahoo, google, facebook , .  whatever credentials? -- You received

[Rails] Re: Controller won't accept a variable number of inputs...

2010-02-16 Thread Frederick Cheung
On Feb 16, 3:32 am, AlwaysCharging goodg...@gmail.com wrote: What am I doing wrong? Is it because I’m limiting the array to 1? but allowing the user to add more?  Is there a way to allow Array to accept any and all, but only display 1 by default? new Array(1) just means create an array

[Rails] Re: Re: Update association on foreign key change?

2010-02-16 Thread Max Williams
Thanks a lot Michael I ended up doing your second suggestion, shying away from the rails magic since i couldn't seem to really control it. Personally it seems most natural to me for rails to work the association magic when either the foreign key is changed or the direct association set method

[Rails] Re: require 'hirb' at the start of every console

2010-02-16 Thread cldwalker
Aside from require 'rubygems', you should also wrap that rails- specific setup in an ENV['RAILS_ENV']. I explained how to do it here: http://tagaholic.me/2009/09/07/hirb-tips-for-rails.html Gabriel On Feb 16, 1:27 am, Vincent P ease...@gmail.com wrote: How do I make the script/console run the

[Rails] Testing Paperclip - post :create fails

2010-02-16 Thread rtacconi
I have a video model using Paperclip to store the file. The model: class Video ActiveRecord::Base belongs_to :category before_save :permalink validates_presence_of :title validates_presence_of :category validates_attachment_presence :filepath, :message = '- please, select a file to

Re: [Rails] How to deal with user requests that take time to process?

2010-02-16 Thread Peter De Berdt
On 15 Feb 2010, at 20:48, PierreW wrote: Could you recommend a common design for the following case (or point me in the right direction): - the user makes a request - the server processes is it, but the process is long therefore it is split into chunks. - the page is rendered with the first

Re: [Rails] Re: Re: Problem with internationalization

2010-02-16 Thread Peter De Berdt
On 15 Feb 2010, at 21:32, Marnen Laibow-Koser wrote: I tried to read through the thread but didn't actually find an answer... Isn't the solution to make sure that en.yml is UTF-8 encoded, ie it in UTF-8? That's part of the solution, yes -- this is another case of Rails simply

[Rails] Re: will_paginate question

2010-02-16 Thread Bigos
After some thinking I finally decided to use following code: in controller: @jobseeker_previous = Jobseeker.find :all, :order = 'id DESC', :conditions = [id ?,@jobseeker.id], :limit = 1 @jobseeker_next = Jobseeker.find :all, :order = 'id ASC', :conditions = [id ?,@jobseeker.id], :limit = 1

[Rails] Re: User stamping and Authlogic

2010-02-16 Thread Sharagoz --
I've been pondering how to do user stamping lately too, event though I dont need to keep a trail like you do. I dont want to make current_user available to all models, and I dont want to use Thread.current. I've been thinking about using this:

[Rails] Re: Amending partials

2010-02-16 Thread Sam
class Business ActiveRecord::Base has_many :addresses has_and_belongs_to_many :categories validates_presence_of :business_name end class Category ActiveRecord::Base has_and_belongs_to_many :businesses validates_presence_of :category end class Address

[Rails] Time out problem

2010-02-16 Thread DanC
Hi, An app I have had online for a while has started timeing out when I add a new user. I think it is failing on the send activation email action. The error dump is below. Am I right in thinking this is the mailer? If so, what could I have changed to make this happen. Sorry to sound gormless,

[Rails] Re: Amending partials

2010-02-16 Thread Sharagoz --
In your previous post you said this: a business can only have one address but an address can have one or many businesses Your models are then set up wrong. They should be: class Business belongs_to :address class Address has_many :businesses A tip: validates_presence_of :street_name

[Rails] Strange routing(?) Issue

2010-02-16 Thread badnaam
I have a Model event and the following two lines in routes.rb 1 - map.connect events/:action, :controller = 'events', :action = / [a-z_]+/i 2 - map.resources :events, :has_many = :comments, :has_one = :address #, :collection = {:mapit = :get} I have #1 so that I can call custom actions from a

[Rails] Re: Time out problem

2010-02-16 Thread Frederick Cheung
On Feb 16, 10:39 am, DanC d.m.coleg...@durham.ac.uk wrote: Hi, An app I have had online for a while has started timeing out when I add a new user. I think it is failing on the send activation email action. The error dump is below. Am I right in thinking this is the mailer? If so, what

[Rails] Facing an error while running Cucumber with selenium

2010-02-16 Thread mahesh s
hi friends while running my test cases im getting the following error requested: cmd=isTextPresent 1=sydney sessionId=60d074397ead45d1ad0272a01db41c3c received: ERROR: Couldn't access document.body. Is this HTML page fully loaded? called from

[Rails] How to populate combobox from db?

2010-02-16 Thread Veena Jose
Hello Friends, I am a newbie in ROR. Can you plz tell me how to populate the combobox with data from db?If you could give both the view and controller part it would be helpful.I am using a Mysql database -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

Re: [Rails] Controller Error

2010-02-16 Thread Colin Law
On 16 February 2010 07:20, prasath venkatraman ask4pras...@gmail.com wrote: Sorry for the newbie question i created a controller and a action for my rails but when i load on my browser am gettin a message like this We're sorry, but something went wrong. We've been notified about this issue

Re: [Rails] Re: Amending partials

2010-02-16 Thread Colin Law
On 16 February 2010 10:32, Sam samir_ode...@hotmail.co.uk wrote: class Business ActiveRecord::Base        has_many :addresses        has_and_belongs_to_many :categories        validates_presence_of :business_name end class Category ActiveRecord::Base        has_and_belongs_to_many

Re: [Rails] YAML, UTF-8, TextMate, Notepad

2010-02-16 Thread Rimantas Liubertas
What I had done was load the ANSI (i.e. iso-8859-1) localization file into Notepad, convert to UTF-8, and saved that file. … It turns out that Notepad places \xEF\xBB\xBF at the beginning of the file to indicate that this is a YAML file. This is not to indicate a YAML file (I doubt Notepad

[Rails] need a faculty who can take class on ROR at Kochi

2010-02-16 Thread JOBY JOHN
dear all, i need a person who can take class on ROR at Kochi the classes will be from march 5, 2010 9 days 7 hours per day regards JOBY -- JOBY JOHN jobyj...@ossics.com jobya...@gmail.com ei...@yahoo.com 91-9446549598 -- You received this message because you are subscribed to the Google Groups

Re: [Rails] How to populate combobox from db?

2010-02-16 Thread Bala
on Controller def index @categories = Category.find(:all) end on View %= select(post, category_id, @categories.collect {|p| [ p.name, p.id ] }, {:include_blank = 'None'})% On Tue, Feb 16, 2010 at 5:08 PM, Veena Jose

[Rails] wrong number of arguments (Wrox Beginning Ruby On Rails)

2010-02-16 Thread seafront
I'm reading a book Beginning Ruby on Rails I made an table, and tried to make an Model class. But it doesn't work. I made the table as below. mysql show columns from books ; +-+--+--+-+-++ | Field | Type | Null | Key | Default

[Rails] Re: How to populate combobox from db?

2010-02-16 Thread rtacconi
or you can use this in your view: %= collection_select(:video, :category_id, Category.all, :id, :name) % Category.all can be called in your controller and passed to the form tag as instance variable... something like @categories = Category.all then %= collection_select(:video, :category_id,

[Rails] Re: Testing Paperclip - post :create fails

2010-02-16 Thread rtacconi
Any idea how to debug? On Feb 16, 9:52 am, rtacconi rtacc...@gmail.com wrote: I have a video model using Paperclip to store the file. The model: class Video ActiveRecord::Base   belongs_to :category   before_save :permalink   validates_presence_of :title   validates_presence_of :category

Re: [Rails] wrong number of arguments (Wrox Beginning Ruby On Rails)

2010-02-16 Thread Colin Law
On 16 February 2010 11:54, seafront seafr...@gmail.com wrote: I'm reading a book Beginning Ruby on Rails I made an table, and tried to make an Model class. But it doesn't work. I made the table as below. mysql show columns from books ;

[Rails] Re: login with twitter, yahoo, google, facebook credentials......

2010-02-16 Thread Florent2
On Feb 15, 11:16 pm, Me chabg...@gmail.com wrote: Does anyone know how to go about giving an option to login to a website with twitter, yahoo, google, facebook , .  whatever credentials? You can try the RPX service https://rpxnow.com/ There is a Rails plugin

[Rails] Re: YAML, UTF-8, TextMate, Notepad

2010-02-16 Thread Ralph Shnelvar
How thoughtful that TextMate does what the article says it should not do. �If there is a way to turn off that behavior, I can't find it. Maybe there's a TextMate bundle ... who knows? Really? Never saw Textmate to do that. Are you sure you did not just loaded file saved elsewhere with

[Rails] Re: Time out problem

2010-02-16 Thread DanC
Hi Fred, Yes it was a firewall issue that I could control. I eventually got the hosting company to sort it out. I thought I was going crazy when it just stopped. Anyway, sorted now and your message gave me the confidence to tell them it was not my fault. Thanks, Dan On 16 Feb, 11:06,

[Rails] Re: Changing the :path and :url options of has_attached_file in paperclip

2010-02-16 Thread Pat Shaughnessy
Probably you need to add a corresponding route + controller action to handle the download requests. I wrote a tutorial a while back on this: http://patshaughnessy.net/2009/5/16/paperclip-sample-app-part-2-downloading-files-through-a-controller - pat http://patshaughnessy.net On Feb 15, 10:10 

Re: [Rails] best way to select uncommon elements from array

2010-02-16 Thread Xavier Noria
On Tue, Feb 16, 2010 at 8:10 AM, rahtha rahul.that...@gmail.com wrote: I have two arrays and i want to get all items which are NOT common to both, so basically if i have two arrays A and B, i want all elements in A that are not in B. what is the best way to do this apart from using two nested

[Rails] [JOBS] Unique Developer Opportunity at Anideo (Singapore)

2010-02-16 Thread Benjamin Wei
Anideo, a Singapore and US based web products company founded by 3 Harvard graduates, one of whom started Facebook.com is currently hiring!. You will be creating, coding, and building cutting-edge web applications that will be used by millions of people. Anideo retains its Silicon Valley start-up

[Rails] Re: User stamping and Authlogic

2010-02-16 Thread Marnen Laibow-Koser
Sharagoz -- wrote: I've been pondering how to do user stamping lately too, event though I dont need to keep a trail like you do. I dont want to make current_user available to all models, and I dont want to use Thread.current. I've been thinking about using this:

[Rails] Re: YAML, UTF-8, TextMate, Notepad

2010-02-16 Thread Marnen Laibow-Koser
Ralph Shnelvar wrote: How thoughtful that TextMate does what the article says it should not do. �If there is a way to turn off that behavior, I can't find it. Maybe there's a TextMate bundle ... who knows? Really? Never saw Textmate to do that. Are you sure you did not just loaded file

[Rails] Installing Plugins

2010-02-16 Thread Anthony Gardner
Coming from Perl and familiar with CPAN, I'd like some info about installing plugins. Basically, do I trust where the libraries are installed? For example, I have installed the Liquid plugin (./script/plugin install http://liquid-markup.googlecode.com/svn/trunk ) and the installation directory

[Rails] Re: YAML, UTF-8, TextMate, Notepad

2010-02-16 Thread Ralph Shnelvar
Marnen Laibow-Koser wrote: Is there a setting to save as UTF-8 without BOM or something? As I said earlier, if there is a setting, I can't find it. TextMate has things call bundles. These are mini-applications tht can be integrated into TextMate. Someone, somewhere may have figured out how

[Rails] Re: best way to select uncommon elements from array

2010-02-16 Thread rahtha
Nope don't care about that case just the ones in A that are not in B On Feb 16, 8:02 am, Xavier Noria f...@hashref.com wrote: On Tue, Feb 16, 2010 at 8:10 AM, rahtha rahul.that...@gmail.com wrote: I have two arrays and i want to get all items which are NOT common to both, so basically if i

[Rails] Subdomain creation and management

2010-02-16 Thread CiriusMex
Hello, I'm creating a webapplication where I would like to dinamically create and detect subdomains. Let's say my webapplication url is www.wookie.com Here comes an exemple: 1. Someone subscribe to the application with the name john 2. I create a new folder in my public/users folder named

Re: [Rails] Re: YAML, UTF-8, TextMate, Notepad

2010-02-16 Thread Rimantas Liubertas
Marnen Laibow-Koser wrote: Is there a setting to save as UTF-8 without BOM or something? As I said earlier, if there is a setting, I can't find it. Textmate does not save BOM for UTF-8 files. Just choose save as, utf-8 and that's it. Regards, Rimantas -- http://rimantas.com/ -- You

[Rails] Re: login with twitter, yahoo, google, facebook credentials......

2010-02-16 Thread kwe...@pobox.com
On Feb 15, 8:16 pm, Me chabg...@gmail.com wrote: Does anyone know how to go about giving an option to login to a website with twitter, yahoo, google, facebook , .  whatever credentials? It sounds like you want to use OpenID: http://leancode.com/openid-for-rails/ --- Kurt Werle I am

[Rails] Re: best way to select uncommon elements from array

2010-02-16 Thread Aldric Giacomoni
rahtha wrote: Nope don't care about that case just the ones in A that are not in B Well, then it's what Frederick said. irb(main):065:0 a = [1,2,3] = [1, 2, 3] irb(main):066:0 b = [2,4,6] = [2, 4, 6] irb(main):067:0 a-b = [1, 3] -- Posted via http://www.ruby-forum.com/. -- You received this

[Rails] Re: Re: YAML, UTF-8, TextMate, Notepad

2010-02-16 Thread Ralph Shnelvar
Rimantas Liubertas wrote: Textmate does not save BOM for UTF-8 files. Just choose save as, utf-8 and that's it. Oh, Geez, I feel like a complete idiot ... I am using e as the text editor ... which the advertising says is textmate for windows. Sorry! It is e that is saving BOM. -- Posted

[Rails] as_json and self-referential associations

2010-02-16 Thread Andrew Edwards
Hi, I'm using the new(?) as_json methods within a rest api I am working on. However I am not sure how you are supposed to, or whether it is designed to handle multiple variations of association inclusion. For example I have a model using acts_as_tree, so that each instance has children and a

[Rails] Re: updated rails now missing rails gem

2010-02-16 Thread Mickael Faivre-Macon
Had the same problem. Thank you so much. Mickael. and figured it out. thin can't cope with rack 1.1.0. uninstalled the rack 1.1.0 gem and all is well again. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: YAML, UTF-8, TextMate, Notepad

2010-02-16 Thread Marnen Laibow-Koser
Ralph Shnelvar wrote: Marnen Laibow-Koser wrote: Is there a setting to save as UTF-8 without BOM or something? As I said earlier, if there is a setting, I can't find it. TextMate has things call bundles. These are mini-applications tht can be integrated into TextMate. Someone,

Re: [Rails] Re: login with twitter, yahoo, google, facebook credentials......

2010-02-16 Thread Chris Habgood
if everyone had an open-id that would work. On Tue, Feb 16, 2010 at 12:08 PM, kwe...@pobox.com kurt.we...@gmail.comwrote: On Feb 15, 8:16 pm, Me chabg...@gmail.com wrote: Does anyone know how to go about giving an option to login to a website with twitter, yahoo, google, facebook , .

[Rails] need advise with search / browsing

2010-02-16 Thread tom
hi, have a JOB-model, which belongs_to a variety of other models, eg: Industry, Category etc... i have: ## controller: def browse @jobs = Job.all @jobind = JobIndustry.all @jobcat = JobCategory.all @joblevelexp = LevelOfExperience.all @joblevelcareer =

[Rails] Re: need advise with search / browsing

2010-02-16 Thread tom
am i better of with that ?(from the api): Post.find(:all, :include = [ :author, :comments ], :conditions = ['comments.approved = ?', true]) can i add as many conditions as i want to the individual associations? thx On Tue, Feb 16, 2010 at 3:29 PM, tom tomabr...@gmail.com wrote: hi, have

[Rails] Re: Re: login with twitter, yahoo, google, facebook credent

2010-02-16 Thread Robert Walker
Chris Habgood wrote: if everyone had an open-id that would work. It's getting to the point that nearly everyone already has an OpenID. You have one if: - You have a Google account - You have a Yahoo account - You have an AOL/AIM account - You have a Microsoft account - And may other OpenID

Re: [Rails] Re: Re: login with twitter, yahoo, google, facebook credent

2010-02-16 Thread ben wiseley
So how exactly does that work. Joe Shmo comes to my site and has a Google account... what do I ask them for - their gmail address? On Tue, Feb 16, 2010 at 1:11 PM, Robert Walker li...@ruby-forum.com wrote: Chris Habgood wrote: if everyone had an open-id that would work. It's getting to

Re: [Rails] Re: Re: login with twitter, yahoo, google, facebook credent

2010-02-16 Thread Greg Donald
On Tue, Feb 16, 2010 at 3:26 PM, ben wiseley wisel...@gmail.com wrote: So how exactly does that work.  Joe Shmo comes to my site and has a Google account... what do I ask them for - their gmail address? http://code.google.com/apis/accounts/docs/OpenID.html -- Greg Donald destiney.com |

[Rails] Re: Re: Re: login with twitter, yahoo, google, facebook cre

2010-02-16 Thread Robert Walker
Ben Wiseley wrote: So how exactly does that work. Joe Shmo comes to my site and has a Google account... what do I ask them for - their gmail address? https://www.google.com/accounts/o8/id Goggle provides the above URL for OpenID. During the conversation with Google's OpenID provider they

[Rails] Form data transfer to another form with a different controle

2010-02-16 Thread Babos Cata
Sigh.. nothing works. I`ll abandone all this. -- 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] Re: Installing Plugins

2010-02-16 Thread Sharagoz --
the installation directory is vendor/plugin/svn I've seen that issue myself a couple of times. Never bothered to look into it, I just renamed the folder manually. it possible to install a gem as a plugin? Check out the gem unpack command I've found these repositories but no joy github.com

[Rails] 12 Month Contract Assignment in New York City

2010-02-16 Thread LenaRoR
Hello! I am looking for a ROR Developer for an immediate 12 mons Contract ONSITE assignment in NYC. If interested, please email word resume along with daytime contact # to l...@kshunya.com for further discussion Thank you! The client is a major financial services organization seeks a RUBY-ON-

Re: [Rails] 12 Month Contract Assignment in New York City

2010-02-16 Thread Conrad Taylor
Hi, thanks for getting into contact with me. My rate for an on-site assignment is $80 per/hour. Next, I'm attaching my resume in Word format. If you require any additional information, please contact me at your earliest. Thank you, Conrad Taylor On Tue, Feb 16, 2010 at 10:44 AM, LenaRoR

[Rails] Re: Form data transfer to another form with a different controle

2010-02-16 Thread Sharagoz --
Sigh.. nothing works. I`ll abandone all this. Hang in there a little longer. If you want the user to first fill in 3 fields, then proceed to another form to fill out the rest of the fields it will look something like this: (You got the first part working, and the 3 fields are submitted to the

[Rails] form_for ... adding locale

2010-02-16 Thread Ralph Shnelvar
% form_for @countryToSearchFor, :url = { :action = show, :id = connected_to_country }, :html = {:method = :get} do |f| % -- 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,

[Rails] Re: form_for ... adding locale

2010-02-16 Thread Ralph Shnelvar
Ralph Shnelvar wrote: % form_for @countryToSearchFor, :url = { :action = show, :id = connected_to_country }, :html = {:method = :get} do |f| % I hit the dame return key. Ugh. Anyway ... Is this the place I should modify so that when the user hits the submit button associated with this

Re: [Rails] Subdomain creation and management

2010-02-16 Thread Peter De Berdt
On 16 Feb 2010, at 18:38, CiriusMex wrote: Hello, I'm creating a webapplication where I would like to dinamically create and detect subdomains. Let's say my webapplication url is www.wookie.com Here comes an exemple: 1. Someone subscribe to the application with the name john 2. I create a

[Rails] Re: Controller won't accept a variable number of inputs...

2010-02-16 Thread AlwaysCharging
Thank you Frederick for clearing that up for me. So I guess the problem is in my Views? Here’s the Javascript to add more fields: %= add_object_link 'Add Another Blog', 'tasks', :partial = 'blogs' % ‘tasks’ is only the div id And here’s the helper def add_object_link(name, where,

[Rails] Re: Controller won't accept a variable number of inputs...

2010-02-16 Thread AlwaysCharging
Oh my god, I found out what I was doing wrong: I had the div id=tasks BEFORE the form_tag in the views, it should have gone afterward. So it now looks like this: % form_tag :action = 'create' do % div id=tasks % @blogs.each_with_index do |blog, index| % Doesn't always come down to

[Rails] dates not being typecast properly, becoming nil?

2010-02-16 Thread jemminger
I have a rails 2.3.5 app running on ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9] locally, and everything is fine. I'm trying to deploy it to my server, running centos 5.4, ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2010.01. When I

[Rails] Appending parameters to a link

2010-02-16 Thread Ralph Shnelvar
Consider link = url_for(:controller = signed_in, :action = show, :id = user_info) # = /signed_in/user_info to which I wish to add the either or both of the following locale=en nickname=ralph Is there a nice way in Rails or Ruby to do this so that I end up with

Re: [Rails] Appending parameters to a link

2010-02-16 Thread Philip Hallstrom
Consider link = url_for(:controller = signed_in, :action = show, :id = user_info) # = /signed_in/user_info to which I wish to add the either or both of the following locale=en nickname=ralph Is there a nice way in Rails or Ruby to do this so that I end up with

[Rails] Re: dates not being typecast properly, becoming nil?

2010-02-16 Thread Robert Walker
Jeff Emminger wrote: I have a rails 2.3.5 app running on ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9] locally, and everything is fine. I'm trying to deploy it to my server, running centos 5.4, ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0x6770, Ruby Enterprise

[Rails] Re: Update association on foreign key change?

2010-02-16 Thread Robert Walker
Max Williams wrote: Hi Michael - i kind of expected that kind of reply :) The reason that i'm doing it in this case is that i've overridden the set method for one of my foreign keys to do some other stuff after changing the foreign key. But, it just occurred to me that a better way to

[Rails] Memcached

2010-02-16 Thread Nicholas Wieland
Hi guys, I remember using memcached in the past, but after the 2.1 release I can't figure out how I'm suppose to configured it with different environments. Cache_fu had a memcached.yml in config/, but I can't find how to configure it if for example I want a single small test memcached server in

Re: [Rails] Re: Update association on foreign key change?

2010-02-16 Thread Greg Donald
On Tue, Feb 16, 2010 at 6:59 PM, Robert Walker li...@ruby-forum.com wrote: OT: This is a slightly off-topic reply, but this really makes me appreciate Key Value Observing (KVO) from the world of Cocoa.

Re: [Rails] Re: Update association on foreign key change?

2010-02-16 Thread Greg Donald
On Tue, Feb 16, 2010 at 7:04 PM, Greg Donald gdon...@gmail.com wrote: On Tue, Feb 16, 2010 at 6:59 PM, Robert Walker li...@ruby-forum.com wrote: OT: This is a slightly off-topic reply, but this really makes me appreciate Key Value Observing (KVO) from the world of Cocoa.

[Rails] Re: dates not being typecast properly, becoming nil?

2010-02-16 Thread jemminger
MySQL 5.0.77 on the server On Feb 16, 7:41 pm, Robert Walker li...@ruby-forum.com wrote: Jeff Emminger wrote: I have a rails 2.3.5 app running on ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9] locally, and everything is fine. I'm trying to deploy it to my server, running centos

Re: [Rails] Memcached

2010-02-16 Thread Marc Byrd
I have it on good authority that ActiveSupport::Cache is a good way to go in Rails 2.1 and beyond (e.g. Rails 3.0 supports it, backward compatible). This interface supports many implementations, including CloudCache if you're on EC2 - see e.g. getCloudCache.com , in particular the video shows how

Re: [Rails] OT - RoR Site Launch

2010-02-16 Thread Robby Russell
Is this spam? I'm baffled... is this a place to find and schedule appointments or a place to try and find masseuses? On Mon, Feb 15, 2010 at 9:31 PM, Craig White craigwh...@azapple.com wrote: OK - but it is built entirely on Ruby on Rails and with some very valuable help from this list...

Re: [Rails] dates not being typecast properly, becoming nil?

2010-02-16 Thread Conrad Taylor
On Tue, Feb 16, 2010 at 4:18 PM, jemminger jemmin...@gmail.com wrote: I have a rails 2.3.5 app running on ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9] locally, and everything is fine. I'm trying to deploy it to my server, running centos 5.4, ruby 1.8.7 (2009-12-24 patchlevel 248)

[Rails] noobish: create migration to add foreign keys with :through attrs?

2010-02-16 Thread fearless_fool
I'm dipping my toe into the world of data warehousing and dimensional databases. In: http://rails.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html I was excited to find the following under the many to many section -- it's the pattern I'm looking for: class

[Rails] FCGI resetting view cache

2010-02-16 Thread Brent
I'm running my rails app with FCGI. I updated a view and noticed it didn't update the site. Deleted it and it even still shows up. I also tried pkill -9 -f dispatch.fcgi. I thought I had done this in the past with controllers and views and it updated.. How do I reset it to load the new view

[Rails] Re: How to use SslRequirement plugin?

2010-02-16 Thread Dan Lamet
Joram wrote: I read somewhere that I should run another instance of webrick, on a https port, is this correct? No. You need to run a separate web server to handle the SSL requests. It will then forward all requests to your Webrick or Mongrel instances. See a

[Rails] Newbie RESTful routing problem, please help!

2010-02-16 Thread tuti plain
Hello, on my last post a few weeks ago, all who replied seemed to agree that the problem I was having was in my routing configuration. I decided to read up a bit on rails routing using this article: http://guides.rails.info/routing.html I decided to try what the article calls RESTful routing.

[Rails] Re: dates not being typecast properly, becoming nil?

2010-02-16 Thread jemminger
Are you started script/console in production mode? Yes, the console is in the same environment as the app. The app is running through passenger 2.2.9 When you look at the production database does this field have a value set? Yes, it's fine in the database, Lastly, can you provide a

[Rails] Can't start Rails 2.3.5 under thin with Bundler 0.9

2010-02-16 Thread Mat Brown
Hi, Just upgraded a Rails app to Bundler 0.9, and I can't start it inside thin unless I actually include thin in the Gemfile as a dependency. Trying both 'script/server thin' and 'thin start'. Since thin is an application container, I don't think it makes sense to include it in the dependency

Re: [Rails] OT - RoR Site Launch

2010-02-16 Thread Craig White
On Tue, 2010-02-16 at 17:17 -0800, Robby Russell wrote: Is this spam? I'm baffled... is this a place to find and schedule appointments or a place to try and find masseuses? I didn't intend to spam - just note a new site was up with RoR and yes, a place to find massage salons. Craig

Re: [Rails] OT - RoR Site Launch

2010-02-16 Thread Greg Donald
On Tue, Feb 16, 2010 at 10:09 PM, Craig White craigwh...@azapple.com wrote: and yes, a place to find massage salons. Tee-he :) -- Greg Donald destiney.com | gregdonald.com -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

[Rails] Re: How to populate combobox from db?

2010-02-16 Thread Veena Jose
Bala wrote: on Controller def index @categories = Category.find(:all) end on View %= select(post, category_id, @categories.collect {|p| [ p.name, p.id ] }, {:include_blank = 'None'})% Thank you so

[Rails] Back button

2010-02-16 Thread Ralph Shnelvar
Is there a way to implement a button that has exactly the same behavior as the browser's back button? -- 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: Newbie RESTful routing problem, please help!

2010-02-16 Thread btomlin
The convention is that controllers are plural, so instead of... class RecetaController ApplicationController you should have... class RecetasController ApplicationController note the plural form of Recetas -- You received this message because you are subscribed to the Google Groups Ruby

Re: [Rails] Re: Re: Update association on foreign key change?

2010-02-16 Thread Jim Tobin
Wouldn't ActiveRecord Observer class do what you're looking for? On Feb 16, 2010, at 1:08 AM, Max Williams wrote: Thanks a lot Michael I ended up doing your second suggestion, shying away from the rails magic since i couldn't seem to really control it. Personally it seems most natural

[Rails] How to add radio buttons?

2010-02-16 Thread Veena Jose
Hello friends, Can u plz tell me how we can add radio buttons in the view? -- 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.

[Rails] Problem with file_field

2010-02-16 Thread Greg Ma
Hi, I trying to do an upload form, bu the file_field doesnt seem to work as it should. I can't access the datafile properties... #form % form_for @student, :url = { :action = upload_file,:id=@student.id }, :multipart = true do |f|% %= file_field 'upload', 'datafile' % %= submit_tag Upload % %

[Rails] combobox-distinct element

2010-02-16 Thread Veena Jose
plz help me in retrieving distinct element from db and populate in combobox? I hav created a model location.It has elements (state,district,province,...) I want to populate one combobox with distinct state and the other combo box should display corresponding districts in that state which is

Re: [Rails] How to add radio buttons?

2010-02-16 Thread Narendra sisodiya
Hello, Rails provides view helpers for creating such input fields following helper method creates radio button *radio_button*(object_name, method, tag_value, options = {}) for more information look at rails helper API doc at

Re: [Rails] Re: How to populate combobox from db?

2010-02-16 Thread Bala
welcome On Wed, Feb 17, 2010 at 9:43 AM, Veena Jose li...@ruby-forum.com wrote: Bala wrote: on Controller def index @categories = Category.find(:all) end on View %= select(post, category_id,

[Rails] Re: Back button

2010-02-16 Thread Anthony Franco
Try: button_to Back, :back On Feb 16, 9:14 pm, Ralph Shnelvar li...@ruby-forum.com wrote: Is there a way to implement a button that has exactly the same behavior as the browser's back button? -- Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed

  1   2   >