[Rails] Re: undefined method `has_key?'

2009-10-22 Thread Michael Gao
Jeffrey L. Taylor wrote: > Quoting Michael Gao : >> >> I update rails from 2.0.2 to 2.2.3, the line below can work at old >> version but report error at new version >> >> <%= render_partial "_jsdatacombo" %> >> > > render_partial is obsolete. Use <%= render :partial => 'jsdatacombo' %> > > (

[Rails] Re: undefined method `has_key?'

2009-10-22 Thread Jeffrey L. Taylor
Quoting Michael Gao : > > I update rails from 2.0.2 to 2.2.3, the line below can work at old > version but report error at new version > > <%= render_partial "_jsdatacombo" %> > render_partial is obsolete. Use <%= render :partial => 'jsdatacombo' %> (Rails will insert the underscore on the f

[Rails] JQuery Multi drag/sort

2009-10-22 Thread Srinath A.
I am looking for a multi drag and drop and multi sortable feature . There will be two divs ListA and ListB where elements in ListA should be able to drag and drop on target ie ListB. I should be able to sort elements in ListA supporting multiple ele...ments at a time to sort and drag . Please sug

[Rails] Re: Google App Engine

2009-10-22 Thread rails.n...@gmail.com
On Oct 23, 3:15 pm, Sijo k g wrote: > http://www.youtube.com/watch?v=pHMpf6hx8Ek Awesome :) --~--~-~--~~~---~--~~ 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 rubyonr

[Rails] Re: Google App Engine

2009-10-22 Thread rails.n...@gmail.com
Thanks Conrad Am very interested in using BigTable, since I think GAE is a platform I'd like to commit to (automatic scaling is a huge plus for me) Just trying to envisage what how a non-relational ActiveRecord will bahave or whether the differences will be transparent. --~--~-~--~

[Rails] Re: Google App Engine

2009-10-22 Thread Conrad Taylor
On Thu, Oct 22, 2009 at 7:57 PM, rails.n...@gmail.com wrote: > > Is anyone doing a project involving GAE? > > Would love to hear of some existing projects! > > My understanding is that Rails 3 Datamapper will be a much, much > better fit for Datastore? > > > In Rails 3.0, ActiveRecord is moving to

[Rails] undefined method `has_key?'

2009-10-22 Thread Michael Gao
I update rails from 2.0.2 to 2.2.3, the line below can work at old version but report error at new version <%= render_partial "_jsdatacombo" %> the error is: undefined method `has_key?' for "_jsdatacombo":String It seemed if I user render_partial function, the system always report the error.

[Rails] Re: Local not passing to partial when validation error

2009-10-22 Thread Sijo k g
Hi Dan Sadaka Is it solved?If not plese paste your controller code Sijo -- 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 pos

[Rails] Re: REXML

2009-10-22 Thread Srinath A.
Can we generate dynamic xml using REXML/XML Builder ? My requirement is to use a sample xml template which contains 5000 lines and each time when user clicks on GO, we will create a new xml file generating all 5000 lines and only approx 3000 lines will be dynamic like Eg: photo name , photo ti

[Rails] Re: ruby-debug and Ruby 1.9.1

2009-10-22 Thread Sijo k g
Hi Martin Streicher I think ruby-debug not compatible with Ruby 1.9.x. Not sure .Please check here http://isitruby19.com/codes Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

[Rails] Re: Google App Engine

2009-10-22 Thread Sijo k g
Hi Dont know more bout this.But I was also watching http://www.youtube.com/watch?v=pHMpf6hx8Ek Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Ta

[Rails] Re: REXML

2009-10-22 Thread Walter McGinnis
Here's some background including some loose benchmarking: http://kete.lighthouseapp.com/projects/14288/tickets/177-tags-list-rss-feed-increasingly-slower Cheers, Walter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

[Rails] Re: REXML

2009-10-22 Thread Walter McGinnis
On Thu, Oct 22, 2009 at 3:49 PM, Marnen Laibow-Koser wrote: > > I do have a question, though: what's the advantage of embedding Builder > in ERb as you did, rather than having the ERb file call a Builder > partial? Performance. Nokogiri's builder is significantly faster than Builder from our t

[Rails] Google App Engine

2009-10-22 Thread rails.n...@gmail.com
Is anyone doing a project involving GAE? Would love to hear of some existing projects! My understanding is that Rails 3 Datamapper will be a much, much better fit for Datastore? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

[Rails] Re: SMTPSyntaxError (501 <>: missing or malformed local part

2009-10-22 Thread Anthony Altemara
I have seen this error as well, and found the problem to be the email address having a leading 'space'. For example, I was passing an email address like this: " Bob Smith " and was getting the error. As soon as I stripped the space away with '.strip' before I assigned it to 'recipients', the

[Rails] A copy of Authenticated/ArgumentError in Smerf_forms#show

2009-10-22 Thread Rail Shafigulin
the full text of the error is below. It seems like that Rails gets confused with dependencies. i tried the solution offered online, specifically insert config.load_paths += %W( #{RAILS_ROOT}/lib ) config.load_once_paths += %W( #{RAILS_ROOT}/lib ) in config/development.rb but it didn't work. ev

[Rails] Re: Rake db:seed problems

2009-10-22 Thread Jamie
well...i feel like an idiot...the blog that I googled and found the instructions for using this on said to use db/seed.rb. just changed it to seeds.rb and it worked beautifully. On Oct 22, 7:43 pm, Jamie wrote: > Tried it with an unfrozen rails installstill won't work. I also > stripped mo

[Rails] Re: Rake db:seed problems

2009-10-22 Thread Jamie
Tried it with an unfrozen rails installstill won't work. I also stripped most of the seed data out of the file and condensed the information for the one model I left in. This is the file in it's entirety: buildingclasses = [ {:name => "Commercial Zones", :land_used => 1 }, {:name =>

[Rails] Re: Plugin to track create, update, delete on certain tables

2009-10-22 Thread Max Williams
Thanks Robert, i'll check it out. -- 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@googlegr

[Rails] Re: UFT8 String looks great in MySql, garbage in browser

2009-10-22 Thread Hassan Schroeder
On Thu, Oct 22, 2009 at 3:32 PM, Peter Laurens wrote: > > Bingo! Thanks Hassan, most of my entries are 'latin1'. > I'm Googling furiously for the answer, but is there a place where I can > set these values? My.cnf? Yep, exactly, set them in your /etc/my.cnf and relaunch mysqld. -- Hassan Schr

[Rails] Re: UFT8 String looks great in MySql, garbage in browser

2009-10-22 Thread Peter Laurens
Bingo! Thanks Hassan, most of my entries are 'latin1'. However I tried to set them with the set command (e.g., "set character_set_results = utf8;"), that didn't have any effect so I rebooted mysql and the settings went back to latin1 again. I'm Googling furiously for the answer, but is there a

[Rails] Re: Hard to do: Creating routes that are permalinks with context info.

2009-10-22 Thread Rob Biedenharn
On Oct 22, 2009, at 5:04 PM, Robb wrote: > On Oct 22, 11:47 am, sax wrote: >> weather_report_url(:location => 'france', :month => 10, :day => 3) > > Ummhmm, I can grab out the attributes of my Report object. And I guess > I can use that with link_to in a template: > > link_to('the report', weath

[Rails] Re: UFT8 String looks great in MySql, garbage in browser

2009-10-22 Thread Hassan Schroeder
On Thu, Oct 22, 2009 at 2:26 PM, Peter Laurens wrote: > Firebug reports the response header content-type as: > > "Content-Type  text/html; charset=utf-8" Excellent :-) Just to cover all the DB bases -- see if *everything* is using utf-8, e.g. mysql> show variables like '%char%'; +

[Rails] Re: UFT8 String looks great in MySql, garbage in browser

2009-10-22 Thread Philip Hallstrom
> On Thu, Oct 22, 2009 at 2:03 PM, Peter Laurens > wrote: > >> I'm not sure how to inspect the HTTP headers as they're returned from >> rails, without breaking out tcpdump what's the best way to see the >> header Rails is creating? > > The Firebug plugin to Firefox works pretty well. Or just use

[Rails] Re: UFT8 String looks great in MySql, garbage in browser

2009-10-22 Thread Marnen Laibow-Koser
Peter Laurens wrote: [...] > Firebug reports the response header content-type as: > > "Content-Type text/html; charset=utf-8" So your HTTP headers are OK and the database is in the right encoding. Now for my stupid question: have you got the text encoding in the browser set to something other

[Rails] Re: UFT8 String looks great in MySql, garbage in browser

2009-10-22 Thread Peter Laurens
Hassan Schroeder wrote: > On Thu, Oct 22, 2009 at 2:03 PM, Peter Laurens > wrote: > >> I'm not sure how to inspect the HTTP headers as they're returned from >> rails, without breaking out tcpdump what's the best way to see the >> header Rails is creating? > > The Firebug plugin to Firefox works

[Rails] Form helper for an array?

2009-10-22 Thread Felix Schäfer
Hello, I'm looking for a form helper to create text_fields to populate an array parameter to the object the form describes. More to the point: I'm trying to write a doodle plugin for redmine, and I have a form_for the doodle object calling the form partial gisted under http://gist.github.c

[Rails] Re: find all with :conditions on NULL values

2009-10-22 Thread Jej
> > It does work if you use the hash form of conditions ( ie conditions => > {:first_category_id => foo} ) > > Fred > Thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To pos

[Rails] Re: Get return from oracle procedure

2009-10-22 Thread Pat Shaughnessy
This doesn’t answer your question directly, but you might want to read about how to obtain Oracle debug output in your Rails app/log file: http://www.alexrothenberg.com/2009/08/how-to-capture-oracles-dbmsoutput-in.html I believe Alex’s patch was recently added to the Oracle Enhanced Adapter... i

[Rails] Re: UFT8 String looks great in MySql, garbage in browser

2009-10-22 Thread Hassan Schroeder
On Thu, Oct 22, 2009 at 2:03 PM, Peter Laurens wrote: > I'm not sure how to inspect the HTTP headers as they're returned from > rails, without breaking out tcpdump what's the best way to see the > header Rails is creating? The Firebug plugin to Firefox works pretty well. Or just use telnet from

[Rails] Re: UFT8 String looks great in MySql, garbage in browser

2009-10-22 Thread Peter Laurens
continued... I try printing out the response object just before my controller falls through to the view, and the header just has one value set: {"Cache-Control"=>"no-cache"} -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this messa

[Rails] Re: Hard to do: Creating routes that are permalinks with context info.

2009-10-22 Thread Robb
On Oct 22, 11:47 am, sax wrote: > weather_report_url(:location => 'france', :month => 10, :day => 3) > Ummhmm, I can grab out the attributes of my Report object. And I guess I can use that with link_to in a template: link_to('the report', weather_report_url(:location => @loc, :month => r.mont

[Rails] Re: UFT8 String looks great in MySql, garbage in browser

2009-10-22 Thread Peter Laurens
Michael Graff wrote: > What encoding is being set in the HTTP headers, if any? > > What is the exact meta tag you are using? The meta tag is: I'm not sure how to inspect the HTTP headers as they're returned from rails, without breaking out tcpdump what's the best way to see the header Rails

[Rails] Re: escape Word chracters for PostGRES

2009-10-22 Thread Marnen Laibow-Koser
Dan Berger wrote: > OK, we solved it with a handful or regexs > > cell.gsub!("\222", "'") > cell.gsub!("\226", "—") > cell.gsub!("\223", '"') > cell.gsub!("\221", "'") > cell.gsub!("\224", '"') This seems like a very bad solution -- particularly the 2nd line, which is pre-escaped HTML instead o

[Rails] Re: Plugin to track create, update, delete on certain tables

2009-10-22 Thread Robert Walker
Max Williams wrote: > Just installed acts_as_audited, absolutely LOVE it. Fantastic. Thanks > again for the pointer, and many thanks to the AAA team. :) If you like that you might also want to take a look at vestal versions. This not only allows you to audit changes on models, but also be abl

[Rails] Re: Displaying a date 'properly'....

2009-10-22 Thread Robert Walker
Robb Shecter wrote: > I put something like this in one of my helpers: > > def format_date(a_date) > a_date.strftime("%B #{a_date.day}, %Y") > end > > Should give you a starting point. Personally, I like the pattern of having separate formatter classes, but using view helpers isn't too

Re: ****[Rails] Re: Unable to Install Ruby Java Bridge

2009-10-22 Thread Fernando Perez
Ather Shiraz wrote: > BTW I figured out how to install this gem ; this opens a whole new > world (hopefully!) That's what I thought until I got pissed off with setting paths and crap like that on different machines. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~

[Rails] Re: UFT8 String looks great in MySql, garbage in browser

2009-10-22 Thread Michael Graff
What encoding is being set in the HTTP headers, if any? What is the exact meta tag you are using? --~--~-~--~~~---~--~~ 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 rub

[Rails] Re: Displaying a date 'properly'....

2009-10-22 Thread lix
try this: http://l1xl1x.blogspot.com/2009/10/custom-date-and-time-format-in-rails.html Regards, Istvan On Oct 22, 6:47 pm, RubyonRails_newbie wrote: > Does anyone know how to implement this? > > On 22 Oct, 18:27, Frederick Cheung wrote: > > > > > On Oct 22, 6:01 pm, RubyonRails_newbie > > wro

[Rails] Re: Displaying a date 'properly'....

2009-10-22 Thread RubyonRails_newbie
Excellent - sorted. Thanks Robb. I've amended it slightly, to have it as dd month year, but it's looking good now. Thanks for your help dude! I'm new to rails - and havent covered this so appreciate the help. On 22 Oct, 19:41, Robb wrote: > > so, if I put: > > >  def format_date(a_date)... > >

[Rails] Re: Hard to do: Creating routes that are permalinks with context info.

2009-10-22 Thread sax
weather_report_url(:location => 'france', :month => 10, :day => 3) On Oct 22, 11:23 am, Robb wrote: > On Oct 22, 10:48 am, Robb wrote: > > > Simple permalinks, yes, like: > > >   /weather/report/10/3 > > > But I do *not* see how to create permalinks for large collections of > > documents, like:

[Rails] Re: Get return from oracle procedure

2009-10-22 Thread Hassan Schroeder
On Thu, Oct 22, 2009 at 11:37 AM, Rafael Roque wrote: > > It should return me two integers,but it´s returning "1". OK, sorry -- I don't know anything about Oracle procedures, but if I execute a query using ActiveRecord::Base.connection.execute(sql) it returns a resultset, e.g. (via script/conso

[Rails] Re: Displaying a date 'properly'....

2009-10-22 Thread Robb
> so, if I put: > >  def format_date(a_date)... > ...in one of my helpers, what do I need to include in the rhtml page? > You could use it like this: Profile was created at <%= format_date(profile.created_at) %> --~--~-~--~~~---~--~~ You received this message

[Rails] Re: Get return from oracle procedure

2009-10-22 Thread Rafael Roque
It should return me two integers,but it´s returning "1". -- 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 ru

[Rails] Re: Displaying a date 'properly'....

2009-10-22 Thread RubyonRails_newbie
so, if I put: def format_date(a_date) > a_date.strftime("%B #{a_date.day}, %Y") > end in one of my helpers, what do I need to include int he rhtml page? On 22 Oct, 18:57, Robb wrote: > I put something like this in one of my helpers: > >   def format_date(a_date) >      a_date.strftime("

[Rails] Re: Hard to do: Creating routes that are permalinks with context info.

2009-10-22 Thread Robb
On Oct 22, 10:48 am, Robb wrote: > Simple permalinks, yes, like: > >   /weather/report/10/3 > > But I do *not* see how to create permalinks for large collections of > documents, like: > >   /france/weather/report/10/3 >   /europe/weather/report/10/3 Hmm; it looks like one solution might be to us

[Rails] Re: Get return from oracle procedure

2009-10-22 Thread Hassan Schroeder
On Thu, Oct 22, 2009 at 11:05 AM, Rafael Roque wrote: > I have a procedure in which I pass two integers and two dates and get > two integer as the result.How could I read the response with ROR? > > Here´s my code: > ActiveRecord::Base.connection.execute("DECLARE  RESULTV NUMBER;... > How could

[Rails] Get return from oracle procedure

2009-10-22 Thread Rafael Roque
Hi all, I have a procedure in which I pass two integers and two dates and get two integer as the result.How could I read the response with ROR? Here´s my code: ActiveRecord::Base.connection.execute("DECLARE RESULTV NUMBER; RESULTBC NUMBER; BEGIN PODEVIAJAR(112,to_date('21/10/2009','DD/MM/'),

[Rails] Re: Displaying a date 'properly'....

2009-10-22 Thread Robb
I put something like this in one of my helpers: def format_date(a_date) a_date.strftime("%B #{a_date.day}, %Y") end Should give you a starting point. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Hard to do: Creating routes that are permalinks with context info.

2009-10-22 Thread Robb
Simple permalinks, yes, like: /weather/report/10/3 But I do *not* see how to create permalinks for large collections of documents, like: /france/weather/report/10/3 /europe/weather/report/10/3 There's one big difference between the first and second example: In the first, all the paramet

[Rails] Re: Displaying a date 'properly'....

2009-10-22 Thread RubyonRails_newbie
Does anyone know how to implement this? On 22 Oct, 18:27, Frederick Cheung wrote: > On Oct 22, 6:01 pm, RubyonRails_newbie > wrote: > > > However. When this is saved to the database it looks like: 1988-10-01. > > Likewise on the site a user will eventually see. If they originally > > enter it a

[Rails] Re: Collection_select and has_many :through

2009-10-22 Thread BenR
Aggghhh Why is it - that 20 seconds after posting a problem - you find at least a partial solution? My problem was passing the wrong information in the locations local variable - @locations = Location.find_all_by_organisation_id(params [:organisation_id]) Since I was creating a new ent

[Rails] UFT8 String looks great in MySql, garbage in browser

2009-10-22 Thread Peter Laurens
Hi, I have some seed data in MySql which contains non-ASCII characters (as you'd imagine as these are worldwide placenames that I'm storing). In MySql on the command line they look great, they're all formatted perfectly, including Arabic and Chinese characters and they look great. However, when

[Rails] Re: Displaying a date 'properly'....

2009-10-22 Thread Frederick Cheung
On Oct 22, 6:01 pm, RubyonRails_newbie wrote: > However. When this is saved to the database it looks like: 1988-10-01. > Likewise on the site a user will eventually see. If they originally > enter it as: 01/10/1988, why does it display backwards? > > And, is there a solution to this to allow i

[Rails] Re: Rake db:seed problems

2009-10-22 Thread Jamie
Yeah, I thought of combining them into something like you suggested, but wanted to get them working in the simplest form before I tried complicating the file. I'll try running it with an unfrozen rails later tonight. Don't have access to an updated rails install right now...thus the frozen rails

[Rails] Displaying a date 'properly'....

2009-10-22 Thread RubyonRails_newbie
Hello everyone, I'm trying to work out how to display a date correctly in Ruby on Rails. At the moment i have a profile page, which when you add it on the site, the data to select is in day, month, year EG 01/10/1988 However. When this is saved to the database it looks like: 1988-10-01. Likewis

[Rails] Re: Rake db:seed problems

2009-10-22 Thread sax
Just a note, you can restructure this to make it a little more DRY. I find this easier to manage in the long run, particularly if I may need to add more later. buildingclasses = [ {:name => "Name", :land_used => 1}, {:name => "Name 2", :land_used => 2} // etc ] puts "adding building classe

[Rails] Re: Collection_select and has_many :through

2009-10-22 Thread BenR
Aggghhh Why is it - that 20 seconds after posting a problem - you find at least a partial solution? My problem was passing the wrong information in the locations local variable - @locations = Location.find_all_by_organisation_id(params [:organisation_id]) Since I was creating a new ent

[Rails] Rake db:seed problems

2009-10-22 Thread Jamie
Hello All, I'm having trouble using the new rake db:seed function. I initially built my app in Rails 3.2.2 but have updated and re-frozen the new version (3.2.4) which is supposed to have the new data seeding function. I created a seed.rb file at db/seed.rb that looks something like this: Buildi

[Rails] Collection_select and has_many :through

2009-10-22 Thread BenR
I am having a bit of an issue with updating multiple models from one form - and in particular the collection_select related to a has_many through relationship. I have the following models: (Location is a pseudo-class which really acts as the join model for the others.) class Location < ActiveRec

[Rails] Re: escape Word chracters for PostGRES

2009-10-22 Thread Matt Jones
A good LART is also helpful in getting users to stop pasting Word's garbage quotes... :) --Matt Jones On Oct 22, 10:27 am, Dan Berger wrote: > OK, we solved it with a handful or regexs > > cell.gsub!("\222", "'") > cell.gsub!("\226", "—") > cell.gsub!("\223", '"') > cell.gsub!("\221", "'") > ce

[Rails] Re: Plugin to track create, update, delete on certain tables?

2009-10-22 Thread Max Williams
Just installed acts_as_audited, absolutely LOVE it. Fantastic. Thanks again for the pointer, and many thanks to the AAA team. :) -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

[Rails] Re: Drag and drop table row problem

2009-10-22 Thread John Mcleod
Oh, another thing. When I click on the row, the all the text in the row does fade (similar to the drag/drop examples). It seems to me that I'm almost there. Thank you. John John Mcleod wrote: > Hello all, > I'm trying my first drag and drop project. Dragging a table row from > one table to a

[Rails] Wish to hire mature RonR consultant

2009-10-22 Thread InventoryTrackers
I've been developing RonR applications for three years and wish to start making things a little easier. I'd like to hire someone who is mature in their thinking to help me find a solution. My ambition is to find a way for users' to upload graphic media ( photos, audio, video ) using a RESTful ap

[Rails] Drag and drop table row problem

2009-10-22 Thread John Mcleod
Hello all, I'm trying my first drag and drop project. Dragging a table row from one table to another. First, get table 1 row to be draggable. I looked over several examples of Prototype/Scriptaculous of drag/drop and thought I was doing right. My problem is after setting it up, no dragging. Tab

[Rails] Re: Error: uninitialized constant MysqlCompat::MysqlRes

2009-10-22 Thread Caleb Cullen
Andrew McDonough wrote: > These instructions also worked for me after upgrading to Snow Leopard. > In my case mysql was in /opt/local/lib/mysql5, so the following fixed it > for me: > > sudo gem uninstall mysql > > export ARCHFLAGS="-arch i386 -arch x86_64" ; gem install --no-rdoc > --no-ri m

[Rails] A gem can display ruby methods call stack on browser

2009-10-22 Thread flyerhzm
Hi guys, I'm writing a gem monitor these days. The monitor gem can display ruby methods call stack on browser. It is based on unroller gem, unroller gem prints methods call stack in console, but it is inconvenient to read. So I write the monitor gem to print method call stack to browser. The rep

[Rails] Re: rails security help

2009-10-22 Thread Marli Ba
Gaspard, I noticed your program uses scopes to limit the returned information. I'm running rails 2.3.4 and there seems to be an issue with scopes and HABTM relationships: that they don't carry through. I've tried using named scopes in my Product class like this: class Product < ActiveRecord::

[Rails] Re: "<%= %>", "<%- %>" and "<% -%>"

2009-10-22 Thread Duke Yamamoto
Robert Walker wrote: > Duke Yamamoto wrote: >> When I want to show output, >> "<%= %>" >> When I do not want to show output, >> "<%- %>" or "<% %>" >> What about this? >> "<% -%>" >> Is this same as "<%- %>"? > > <%# %> or <%# -%> > For commenting out ERB code. I'm seeing code, <% if flash[:erro

[Rails] Re: Error: uninitialized constant MysqlCompat::MysqlRes

2009-10-22 Thread Andrew McDonough
These instructions also worked for me after upgrading to Snow Leopard. In my case mysql was in /opt/local/lib/mysql5, so the following fixed it for me: sudo gem uninstall mysql export ARCHFLAGS="-arch i386 -arch x86_64" ; gem install --no-rdoc --no-ri mysql -- --with-mysql-dir=/opt/local/lib/

[Rails] Re: escape Word chracters for PostGRES

2009-10-22 Thread Dan Berger
OK, we solved it with a handful or regexs cell.gsub!("\222", "'") cell.gsub!("\226", "—") cell.gsub!("\223", '"') cell.gsub!("\221", "'") cell.gsub!("\224", '"') Thanks! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message b

[Rails] Re: Using Rails to Kill Your Signup Forms

2009-10-22 Thread Robert Walker
logan wrote: > Even though the gradual engagement meme has been around for a while, > and everyone just hates signup forms, they just seem to keep popping > up like a bad habit. My site, Newsforwhatyoudo.com was one of the > guilty parties. We saw users coming back to the site repeatedly, but > no

[Rails] Re: XML file using Nokogiri gem

2009-10-22 Thread Robert Walker
Ghanshyam Rathod wrote: > I m using Builder for Nokogiri (Nokogiri::XML::Builder.new). > But i m facing problem with displaying XML file in view. > > see the code i have used http://pastie.org/663424. Are you already using Nokogiri in other parts of your application? If not then why force the d

[Rails] Re: using will_paginate

2009-10-22 Thread Frederick Cheung
On Oct 22, 1:48 pm, Eduardo Bueno wrote: > > def index >   @clients = Client.paginate :page => params[:page], :per_page => 5 > end > > and the code in clients/index.html.erb: > > <%= will_paginate @clients %> > > The problem is I don't see any client specification. The pagination is > working f

[Rails] How to increase the response speed rails application

2009-10-22 Thread saravanan bava
Hi friends, How to increase the response speed rails application. Pls suggest some steps to improve the performance. Thanks Bava --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post t

[Rails] using will_paginate

2009-10-22 Thread Eduardo Bueno
Hello, I have installed will_paginate gem for my application, but it is not working properly. This is the code in clients_controller.rb: def index @clients = Client.paginate :page => params[:page], :per_page => 5 end and the code in clients/index.html.erb: <%= will_paginate @clients %> The

[Rails] ruby-debug and Ruby 1.9.1

2009-10-22 Thread Martin Streicher
Has anyone built ruby-debug for Ruby 1.9.1? I am on Leopard. A check around the Web yielded issues with the pair, but no solution (I'll keep looking), hence my question. Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

[Rails] Re: Tools for developing a facebook application

2009-10-22 Thread Marnen Laibow-Koser
Dan Green wrote: > What tools are available to add a Facebook widget to my rails > application? Do you mean a Facebook Connect button in your Rails app, or a profile box (or something) within Facebook? > Thanks! Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted vi

[Rails] Re: Plz test my patch for resources with path_prefix with a variable

2009-10-22 Thread saravanan bava
Hi friends, How to increase the response speed rails application. Pls suggest some steps to improve the performance. Thanks Bava --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post t

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Ralu rm
Max Williams wrote: > Ralu rm wrote: >> Max Williams wrote: >>> dude, there's an api for a reason!! I personally like the version at >>> http://railsbrain.com, why not go and read it >> >> am just a beginner, >> dats y dat quest buddy... >> anyway thanks for the link! > > I know you're a begin

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Max Williams
Ralu rm wrote: > Max Williams wrote: >> dude, there's an api for a reason!! I personally like the version at >> http://railsbrain.com, why not go and read it > > am just a beginner, > dats y dat quest buddy... > anyway thanks for the link! I know you're a beginner, but if you know the name of

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Ralu rm
Max Williams wrote: > dude, there's an api for a reason!! I personally like the version at > http://railsbrain.com, why not go and read it am just a beginner, dats y dat quest buddy... anyway thanks for the link! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~-

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Max Williams
dude, there's an api for a reason!! I personally like the version at http://railsbrain.com, why not go and read it. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby o

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Ralu rm
Ralu rm wrote: > Max Williams wrote: >> Oops, sorry, that text area in the amended form should be >> >> <%= f.text_area :content, :cols => 40, :rows => 12 %> > > but in dat form_for der is no action , will it directly go to :action => 'create'?? -- Posted via http://www.ruby-forum.com/.

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Ralu rm
Max Williams wrote: > Oops, sorry, that text area in the amended form should be > > <%= f.text_area :content, :cols => 40, :rows => 12 %> thanks guys nw its working fine... -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this messag

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Max Williams
Oops, sorry, that text area in the amended form should be <%= f.text_area :content, :cols => 40, :rows => 12 %> -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Ra

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Max Williams
Sorry to butt in guys, i get the feeling you're going to go round in circles forever. Ralu - if the user types 'foo' in the text box, params will look like this: params = {:resolve => {:content => "foo"}} In the controller you need to do this: @resolve = Resolve.new(params[:resolve]) which

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Sijo k g
Hi Ralu rm That is already there in params[:resolve] Sijo -- 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 ema

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Brijesh Shah
> <%= form_tag :action => 'resolve_create', :resolve => @resolve %> > resolution: > <%= text_area 'resolve','content', :cols => 40, :rows => 12 %> > > <%= submit_tag "save" %> > Try below code <%= form_tag :action => 'resolve_create' do %> resolution: <%= text_area 'resolve','content

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Ralu rm
Sijo k g wrote: > Hi Ralu rm > >> i have an error >> undefined method `stringify_keys!' for "":String > > The reason for this error is in the line > >> <%= form_tag :action => 'resolve_create', :resolve => @resolve %> > >Since this will generate source like > action="/controller/re

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Sijo k g
Hi Ralu rm > i have an error > undefined method `stringify_keys!' for "":String The reason for this error is in the line > <%= form_tag :action => 'resolve_create', :resolve => @resolve %> Since this will generate source like action="/controller/resolve_create?resolve=" And in reso

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Ralu rm
Brijesh Shah wrote: >> def resolve_create >> @resolve = Resolve.new(params[:resolve1]) >> if @resolve.save >> redirect_to :action => 'list' >> else >> redirect_to :action => 'resolve' >> end >> end > Problem is in parameters arguments... > > It should be params[:resolve] n

[Rails] Re: JQuery GET without link_to_remote. How ?

2009-10-22 Thread Ale Ds
Leonardo Mateo wrote: > On Tue, Oct 20, 2009 at 6:05 PM, Ale Ds > wrote: >> >> Hi, >> I start to use JQuery with Rails: >> I should make a simple text link to call in Ajax (by GET) an action in >> controller. >> >> link_to_remote is a Prototype method, I would use just a javascript >> framework (

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Brijesh Shah
> def resolve_create > @resolve = Resolve.new(params[:resolve1]) > if @resolve.save > redirect_to :action => 'list' > else > redirect_to :action => 'resolve' > end > end Problem is in parameters arguments... It should be params[:resolve] not params[:resolve1]... Thanks Br

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Ralu rm
srinivasan sakthivel wrote: > Otherwise u can try this one > > def resolve_create > @resolve = Resolve.new() > @resolve.content = params[:resolve][:content] > if @resolve.save >redirect_to :action => 'list' > else >render :action => 'resolve' > end > end > > Thanks > seenu > > > O

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread srinivasan sakthivel
Otherwise u can try this one def resolve_create @resolve = Resolve.new() @resolve.content = params[:resolve][:content] if @resolve.save redirect_to :action => 'list' else render :action => 'resolve' end end Thanks seenu On Thu, Oct 22, 2009 at 2:36 PM, srinivasan sakthivel < seenusss

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread srinivasan sakthivel
def resolve_create @resolve = Resolve.new(params[:resolve1]) if @resolve.save redirect_to :action => 'list' else render :action => 'resolve' end end u can try the above code. Thanks seenu. On Thu, Oct 22, 2009 at 2:30 PM, Ralu rm wrote: > > srinivasan sakthivel wrote: >

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread Ralu rm
srinivasan sakthivel wrote: > hi > > > Give me ur controller code. > > thanks > seenu > > On Thu, Oct 22, 2009 at 1:54 PM, Ralu rm def update @ticket = Ticket.find(params[:id]) if @ticket.update_attributes(params[:ticket]) redirect_to :action => 'list' else redirect_

[Rails] Re: undefined method `stringify_keys!' for "":String

2009-10-22 Thread srinivasan sakthivel
hi Give me ur controller code. thanks seenu On Thu, Oct 22, 2009 at 1:54 PM, Ralu rm wrote: > > > i have an error >undefined method `stringify_keys!' for "":String > > my view is given below > > <%= form_tag :action => 'resolve_create', :resolve => @resolve %> > resolution: > <%= tex

[Rails] undefined method `stringify_keys!' for "":String

2009-10-22 Thread Ralu rm
i have an error undefined method `stringify_keys!' for "":String my view is given below <%= form_tag :action => 'resolve_create', :resolve => @resolve %> resolution: <%= text_area 'resolve','content', :cols => 40, :rows => 12 %> <%= submit_tag "save" %> what is dat error and how

  1   2   >