Re: [Rails] Re: Any way to use a radio button attached to record id during a create

2011-12-24 Thread Walter Lee Davis
On Dec 25, 2011, at 12:15 AM, Bob Smith wrote: > > > On Dec 24, 1:18 pm, Walter Lee Davis wrote: > Use an :after_create callback in those cases; you will have the ID at > that point and you can use it. Remember, you will need to set any > relationship keys directly, not at the object level, si

[Rails] Re: Any way to use a radio button attached to record id during a create

2011-12-24 Thread Bob Smith
On Dec 24, 1:18 pm, Walter Lee Davis wrote: Use an :after_create callback in those cases; you will have the ID at that point and you can use it. Remember, you will need to set any relationship keys directly, not at the object level, since you can't call save again in an after_create (I don't thi

Re: [Rails] Re: Installing Ruby, I Exported Bash Profile Twice

2011-12-24 Thread jsf
Hi everyone, I'm running MacOSX Lion... I use ports to manage packages.. I have ruby, gem and rails installed... I also have XCode installed. I've been having problem occurring when updating gems: "Invalid gemspec in [/Library/Ruby/Gems/1.8/specifications/json-1.6.1.gemspec]: invalid date form

[Rails] 2.3.8 v. 3.1.1 text escaping

2011-12-24 Thread Ralph Shnelvar
In a view I emit a 12 character string "abcdef". In 2.3.8 "abcdef" is rendered. In 3.1.1 "abc\
def" is rendered. The 2.3.8 behavior is what I want. How do I get it? Ralph Shnelvar -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] Re: Rails 3.1 & Routes & Root

2011-12-24 Thread Ralph Shnelvar
That was exactly what I wanted and it works. Thank you. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe fr

Re: [Rails] uom gem

2011-12-24 Thread Joao Souza
Ok Thanks, marry christmas for you too and for all of this group. On 24/12/11 15:01, "thiagocifani" wrote: > Man, if you read the readme you will figure out that this plugin is out of > date! You can have a talk with Greg brown, he is one of the authors ! Or you > can try try by yourself to upd

Re: [Rails] SV: Re: SV: Simple friendship table

2011-12-24 Thread Colin Law
On 24 December 2011 18:50, Fresh Mix wrote: > Brynjolfur Thorvardsson wrote in post #1037995: > >> @var1 = @friends.where() >> @var2 = @friends.where() >> >> @friendsfound = @var1 + @var2 > > > tmp1 = Friendships.includes(:users).select("uid1 as user_id", > status).where("uid2 = (?)", @user.id) >

Re: [Rails] Rails 3.1 & Routes & Root

2011-12-24 Thread Hassan Schroeder
On Sat, Dec 24, 2011 at 10:38 AM, Ralph Shnelvar wrote: > how do I add a parameter? >  root :to => 'home#show?locale=en' > does not seem to work. root :to => 'home#show', :locale => :en seems to :-) -- Hassan Schroeder hassan.schroe...@gmail.com http://about.me/hass

[Rails] SV: Re: SV: Simple friendship table

2011-12-24 Thread Fresh Mix
Brynjolfur Thorvardsson wrote in post #1037995: > @var1 = @friends.where() > @var2 = @friends.where() > > @friendsfound = @var1 + @var2 tmp1 = Friendships.includes(:users).select("uid1 as user_id", status).where("uid2 = (?)", @user.id) tmp2 = Friendships.includes(:users).select("uid2 as user_id

[Rails] Rails 3.1 & Routes & Root

2011-12-24 Thread Ralph Shnelvar
I have Ultradedup002::Application.routes.draw do match ':controller/:action(:id)' root :to => 'home#show' end Focusing on root :to => 'home#show' how do I add a parameter? root :to => 'home#show?locale=en' does not seem to work. -- Posted via http://www.ruby-forum.com/. -- You receiv

Re: [Rails] Re: Any way to use a radio button attached to record id during a create

2011-12-24 Thread Walter Lee Davis
On Dec 24, 2011, at 2:18 AM, Bob Smith wrote: > On Dec 20, 3:53 am, Colin Law wrote: >> On 20 December 2011 07:03, Bob Smith wrote: >> >>> I'm doing a list of family members, each with aradiobutton for head >>> of household. After the household record and the records for each >>> person are cr

Re: [Rails] uom gem

2011-12-24 Thread thiagocifani
Man, if you read the readme you will figure out that this plugin is out of date! You can have a talk with Greg brown, he is one of the authors ! Or you can try try by yourself to update it to 3.0 ! I think this is the problem! Gems are better than plugins cause they can handle with dependency in

[Rails] Re: How to split a array

2011-12-24 Thread Alex Mercer
honey ruby, c'mon.. Did you know about such things like controllers? Passing whole work with arrays in views it's a bad idea. # app/controllers/my_controller.rb class MyController < ApplicationController def commers @late_commers = "Khamar Md,2 hrs: 5 min,Accounts,Gandhinagar".split(",")

Re: [Rails] uom gem

2011-12-24 Thread Joao Souza
Hi all, I couldn't start my app, after install the plugin. I got the error bellow... activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require': no such file to load -- activerecord (LoadError) I opened the dependencies.rb file and I think that the problem is with the require, the i

[Rails] bundle update hangs.

2011-12-24 Thread Mauro
While bundle install works with no problems, when I run bundle update it hangs indefinitely. You find so? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscri

Re: [Rails] OSXyZ here

2011-12-24 Thread Phil Dobbin
On 24/12/11 10:24, "Colin Law" wrote: > On 23 December 2011 22:17, OSXyZ wrote: >> >> hey guys, >> >> my issue is probably not forum worthy. >> here is what my dilemma looks like per the attached screenshot. >> >> any idea how to clean this up? > > It would clean up the email if you posted i

Re: [Rails] OSXyZ here

2011-12-24 Thread Colin Law
On 23 December 2011 22:17, OSXyZ wrote: > > hey guys, > > my issue is probably not forum worthy. > here is what my dilemma looks like per the attached screenshot. > > any idea how to clean this up? It would clean up the email if you posted in plain text rather than html. To save us struggling to

[Rails] Re: Installing Ruby, I Exported Bash Profile Twice

2011-12-24 Thread Dheeraj Kumar
Just run railsready, and your mac will be set up fully. Dheeraj Kumar On Saturday 24 December 2011 at 3:32 AM, OSXyZ wrote: > Hell All, > > Yep, I'm new to Ruby. I was following the Lynda.com (http://Lynda.com) > tutorial and > seemed to exported the bash profile twice. All I know is that i

[Rails] Installing Ruby, I Exported Bash Profile Twice

2011-12-24 Thread OSXyZ
Hell All, Yep, I'm new to Ruby. I was following the Lynda.com tutorial and seemed to exported the bash profile twice. All I know is that it looks nothing like what the tutorial suggest I should have and I know setting up the correct path is critical to getting everything installed. Can anyone p

Re: [Rails] Re: Any way to use a radio button attached to record id during a create

2011-12-24 Thread Colin Law
On 24 December 2011 07:18, Bob Smith wrote: > On Dec 20, 3:53 am, Colin Law wrote: >> On 20 December 2011 07:03, Bob Smith wrote: >> >> > I'm doing a list of family members, each with aradiobutton for head >> > of household. After the household record and the records for each >> > person are cre