I''m having trouble capturing the params from a select type form. For text field like this: <%= text_field_tag :courseid %> I''m able to capture the posted value with this params[:courseid] However with a select field like this: <%= select(:course, :id, %w{value1 value2 value3} %> I''m not sure how to capture the posted value. -- Posted via http://www.ruby-forum.com/.
I did a "sudo gem install rails --source http://gems.rubyonrails.org" to get the latest version, before trying a freeze_edge on my app. Running on OSX 10.4.5. There appears to be problem with lighttpd.conf. What should CWD''s value be? [tachyon][~/Rails/test11]$ script/server webrick => Booting WEBrick... => Rails application started on http://0.0.0.0:3000 => Ctrl-C to shutdown server; call with --help for options [2006-03-28 15:22:21] INFO WEBrick 1.3.1 [2006-03-28 15:22:21] INFO ruby 1.8.4 (2005-12-24) [powerpc- darwin8.3.0] [2006-03-28 15:22:21] INFO WEBrick::HTTPServer#start: pid=7945 port=3000 ^C[2006-03-28 15:22:27] INFO going to shutdown ... [2006-03-28 15:22:27] INFO WEBrick::HTTPServer#start done. [tachyon][~/Rails/test11]$ script/server => Booting lighttpd (use ''script/server webrick'' to force WEBrick) => Rails application started on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server (see config/lighttpd.conf for options) Undefined config variable: var.CWD 2006-03-28 15:22:36: (configfile.c.800) source: config/lighttpd.conf line: 8 pos: 43 parser failed somehow near here: + Exiting Cheers, Paul
What version of Light? needs to be 1.4.10 or above I believe. ~ Ben On 3/28/06, Paul Mylchreest <paul.mylchreest@mac.com> wrote:> I did a "sudo gem install rails --source http://gems.rubyonrails.org" > to get the latest version, before trying a freeze_edge on my app. > Running on OSX 10.4.5. > > There appears to be problem with lighttpd.conf. What should CWD''s > value be? > > [tachyon][~/Rails/test11]$ script/server webrick > => Booting WEBrick... > => Rails application started on http://0.0.0.0:3000 > => Ctrl-C to shutdown server; call with --help for options > [2006-03-28 15:22:21] INFO WEBrick 1.3.1 > [2006-03-28 15:22:21] INFO ruby 1.8.4 (2005-12-24) [powerpc- > darwin8.3.0] > [2006-03-28 15:22:21] INFO WEBrick::HTTPServer#start: pid=7945 > port=3000 > ^C[2006-03-28 15:22:27] INFO going to shutdown ... > [2006-03-28 15:22:27] INFO WEBrick::HTTPServer#start done. > > [tachyon][~/Rails/test11]$ script/server > => Booting lighttpd (use ''script/server webrick'' to force WEBrick) > => Rails application started on http://0.0.0.0:3000 > => Call with -d to detach > => Ctrl-C to shutdown server (see config/lighttpd.conf for options) > Undefined config variable: var.CWD > 2006-03-28 15:22:36: (configfile.c.800) source: config/lighttpd.conf > line: 8 pos: 43 parser failed somehow near here: + > Exiting > > Cheers, > Paul > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Ben Reubenstein http://www.benr75.com
Paul Mylchreest wrote:> I did a "sudo gem install rails --source http://gems.rubyonrails.org" to > get the latest version, before trying a freeze_edge on my app. Running > on OSX 10.4.5. > > There appears to be problem with lighttpd.conf. What should CWD''s value be?Per http://clarkware.com/cgi/blosxom/2006/03/28#Rails11 You need to be running lighttpd 1.4.11. Ray
Did a "rake freeze_edge" on my app followed by "rake rails:update", then get this error. Installed in my app are "Engines, "LoginEngine", "UserEngine" and "Userstamp". => Booting WEBrick... ./script/../config/../vendor/rails/activesupport/lib/active_support/ inflector.rb:125:in `underscore'': stack level too deep (SystemStackError) from ./script/../config/../vendor/rails/activesupport/lib/ active_support/core_ext/string/inflections.rb:29:in `underscore'' from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:84:in `const_missing'' from ./script/../config/../vendor/plugins/engines/lib/ dependencies_extensions.rb:28:in `require_or_load'' from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:30:in `depend_on'' from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:74:in `require_dependency'' from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:87:in `const_missing'' from ./script/../config/../vendor/plugins/engines/lib/ dependencies_extensions.rb:28:in `require_or_load'' from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:30:in `depend_on'' ... 1322 levels... from ./script/../config/../vendor/rails/railties/lib/ commands/servers/webrick.rb:52 from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:136:in `require'' from ./script/../config/../vendor/rails/railties/lib/ commands/server.rb:30 from script/server:3 Cheers, Paul
I believe that params[:course][:id] will get you there. HTH, Bill ----- Original Message ----- From: "BB" <bbsaid1@yahoo.com> To: <rails@lists.rubyonrails.org> Sent: 2006-03-28 1:50 PM Subject: [Rails] Correct way to capture a select param> I''m having trouble capturing the params from a select type form. > > For text field like this: > > <%= text_field_tag :courseid %> > > I''m able to capture the posted value with this > > params[:courseid] > > However with a select field like this: > > <%= select(:course, :id, %w{value1 value2 value3} %> > > I''m not sure how to capture the posted value. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
I ran into this problem when I was doing some testing on Rails Edge. You will need to updates Rails Engines, I believe they just released a version today that supports rails 1.1 ---------------------------------------------------------------------------------------------------- What''s an Intel chip doing in a Mac? A whole lor more that it''s ever done in a PC. My Digital Life - http://scottwalter.com/blog Pro:Blog - http://scottwalter.com/problog ----- Original Message ---- From: Paul Mylchreest <paul.mylchreest@mac.com> To: rails@lists.rubyonrails.org Sent: Tuesday, March 28, 2006 3:47:42 PM Subject: [Rails] Rails 1.1 on OSX 10.4.5 startup error Did a "rake freeze_edge" on my app followed by "rake rails:update", then get this error. Installed in my app are "Engines, "LoginEngine", "UserEngine" and "Userstamp". => Booting WEBrick... ./script/../config/../vendor/rails/activesupport/lib/active_support/ inflector.rb:125:in `underscore'': stack level too deep (SystemStackError) from ./script/../config/../vendor/rails/activesupport/lib/ active_support/core_ext/string/inflections.rb:29:in `underscore'' from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:84:in `const_missing'' from ./script/../config/../vendor/plugins/engines/lib/ dependencies_extensions.rb:28:in `require_or_load'' from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:30:in `depend_on'' from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:74:in `require_dependency'' from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:87:in `const_missing'' from ./script/../config/../vendor/plugins/engines/lib/ dependencies_extensions.rb:28:in `require_or_load'' from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:30:in `depend_on'' ... 1322 levels... from ./script/../config/../vendor/rails/railties/lib/ commands/servers/webrick.rb:52 from ./script/../config/../vendor/rails/activesupport/lib/ active_support/dependencies.rb:136:in `require'' from ./script/../config/../vendor/rails/railties/lib/ commands/server.rb:30 from script/server:3 Cheers, Paul _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060328/1b7ffc76/attachment-0001.html
Installed 1.4.11. That fixed things. Thanks. Paul On 28-Mar-06, at 16:28 , Ben Reubenstein wrote:> What version of Light? needs to be 1.4.10 or above I believe. > > ~ Ben > > On 3/28/06, Paul Mylchreest <paul.mylchreest@mac.com> wrote: >> I did a "sudo gem install rails --source http://gems.rubyonrails.org" >> to get the latest version, before trying a freeze_edge on my app. >> Running on OSX 10.4.5. >> >> There appears to be problem with lighttpd.conf. What should CWD''s >> value be? >> >> [tachyon][~/Rails/test11]$ script/server webrick >> => Booting WEBrick... >> => Rails application started on http://0.0.0.0:3000 >> => Ctrl-C to shutdown server; call with --help for options >> [2006-03-28 15:22:21] INFO WEBrick 1.3.1 >> [2006-03-28 15:22:21] INFO ruby 1.8.4 (2005-12-24) [powerpc- >> darwin8.3.0] >> [2006-03-28 15:22:21] INFO WEBrick::HTTPServer#start: pid=7945 >> port=3000 >> ^C[2006-03-28 15:22:27] INFO going to shutdown ... >> [2006-03-28 15:22:27] INFO WEBrick::HTTPServer#start done. >> >> [tachyon][~/Rails/test11]$ script/server >> => Booting lighttpd (use ''script/server webrick'' to force WEBrick) >> => Rails application started on http://0.0.0.0:3000 >> => Call with -d to detach >> => Ctrl-C to shutdown server (see config/lighttpd.conf for options) >> Undefined config variable: var.CWD >> 2006-03-28 15:22:36: (configfile.c.800) source: config/lighttpd.conf >> line: 8 pos: 43 parser failed somehow near here: + >> Exiting >> >> Cheers, >> Paul >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > -- > Ben Reubenstein > http://www.benr75.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Thank you bill, worked like I always hoped it would Bill Walton wrote:> I believe that params[:course][:id] will get you there. > > HTH, > Bill > ----- Original Message ----- > From: "BB" <bbsaid1@yahoo.com> > To: <rails@lists.rubyonrails.org> > Sent: 2006-03-28 1:50 PM > Subject: [Rails] Correct way to capture a select param-- Posted via http://www.ruby-forum.com/.