[Rails] gruff : label problem

2009-10-22 Thread Ahmet Kilic
def terminal_report_hourly g = Gruff::Bar.new(600x300) g.theme_37signals g.title = my graph reports = TerminalHistory.find(:all, :conditions = [terminal_histories.created_at ?, 1.hour.ago.to_s(:db)], :select = terminal_code, hour(created_at), count(*) as total, :group =

[Rails] Nginx + Thin/Passenger

2009-10-22 Thread Arthur Chan
Hi guys, I've tried to set up nginx and thin. I succeeded in doing so in my Win. But failed in Ubuntu (sometimes...). I am quite frustrated as I supposed that should be a simple task. Now I found the passenger. And it seems to be a great thing to save me. So, could I ask what is the pros

[Rails] Re: undefined local variable or method `autosave_associated_records_for_book' when saving record

2009-10-22 Thread Jacob Helwig
On Sat, Oct 17, 2009 at 14:49, Jacob Helwig jacob.hel...@gmail.com wrote: So, I'm at a loss trying to figure out where I screwed something up here. I've got (what I think should be) a fairly straight-forward record setup, but when I try to create/save a BookEdition record, I get the

[Rails] Re: alias_method_chain and ActiveSupport::TestCase

2009-10-22 Thread Frederick Cheung
On Oct 21, 7:38 pm, erik e...@carwoo.com wrote: i'm not sure why the alias_method_chain seems to work for test with no setup method and not for one that has a setup method defined.  Any help would be great. In a nutshell, because there is no reason it should. If a class overrides the

[Rails] Re: image_path without timestamp

2009-10-22 Thread Thomas Gendulphe
Hi, To disable asset_id completely, simply set the environment variable (for instance in environment.rb): ENV['RAILS_ASSET_ID'] = cheers Philip Hallstrom wrote: .swf file in public/images/flash fine. In production, the app will be deployed in a subdirectory, so the path will be

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

2009-10-22 Thread Johannes Barre
Hi! The problem: You may have read the I18n-Guide ( http://guides.rubyonrails.org/i18n.html#setting-the-locale-from-the-url-params). It says, that the usual way to provide the locale is in the URL, like example.com/en/books/2. But: map.resources :books, :path_prefix = '/:locale' [...] This

[Rails] Tools for developing a facebook application

2009-10-22 Thread Dan Green
What tools are available to add a Facebook widget to my rails application? Thanks! --~--~-~--~~~---~--~~ 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] 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 % presolution:br / %= text_area 'resolve','content', :cols = 40, :rows = 12 %/p %= submit_tag save % what is dat error and how can i

[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 rails-mailing-l...@andreas-s.netwrote: i have an error undefined method `stringify_keys!' for :String my view is given below %= form_tag :action = 'resolve_create', :resolve = @resolve %

[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_to

[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 rails-mailing-l...@andreas-s.netwrote:

[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

[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 On Thu, Oct 22,

[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 Brijesh

[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 rails-mailing-l...@andreas-s.net 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

[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] not

[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 resolve_create

[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

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

2009-10-22 Thread Brijesh Shah
%= form_tag :action = 'resolve_create', :resolve = @resolve % presolution:br / %= text_area 'resolve','content', :cols = 40, :rows = 12 %/p %= submit_tag save % Try below code %= form_tag :action = 'resolve_create' do % presolution:br / %= text_area 'resolve','content', :cols

[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

[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 is

[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 %/p -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[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 %/p thanks guys nw its working fine... -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message

[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 %/p 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 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

[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: 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 to

[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 via

[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

[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] 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 to

[Rails] Re: using will_paginate

2009-10-22 Thread Frederick Cheung
On Oct 22, 1:48 pm, Eduardo Bueno rails-mailing-l...@andreas-s.net 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

[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

[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 not

[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, mdash;) cell.gsub!(\223, '') cell.gsub!(\221, ') cell.gsub!(\224, '') Thanks! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you

[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 --

[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[:error] -% %= flash[:error] % % end -% It works

[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

[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

[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 mysql --

[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.

[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

[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

[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

[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 rails-mailing-l...@andreas-s.net wrote: OK, we solved it with a handful or regexs cell.gsub!(\222, ') cell.gsub!(\226, mdash;) cell.gsub!(\223, '')

[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

[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:

[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

[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 classes

[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.

[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] Re: Displaying a date 'properly'....

2009-10-22 Thread Frederick Cheung
On Oct 22, 6:01 pm, RubyonRails_newbie craigwest...@googlemail.com 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

[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: 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

[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 frederick.che...@gmail.com wrote: On Oct 22, 6:01 pm, RubyonRails_newbie craigwest...@googlemail.com wrote: However. When this is saved to the database it looks like: 1988-10-01. Likewise on the site a user will

[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

[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] 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

[Rails] Re: Get return from oracle procedure

2009-10-22 Thread Hassan Schroeder
On Thu, Oct 22, 2009 at 11:05 AM, Rafael Roque rails-mailing-l...@andreas-s.net 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  

[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 robb.shec...@gmail.com 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

[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 robb.shec...@gmail.com wrote: I put something like this in one of my helpers:   def format_date(a_date)      

[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

[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: p Profile was created at %= format_date(profile.created_at) % /p --~--~-~--~~~---~--~~ You received this message

[Rails] Re: Get return from oracle procedure

2009-10-22 Thread Hassan Schroeder
On Thu, Oct 22, 2009 at 11:37 AM, Rafael Roque rails-mailing-l...@andreas-s.net 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

[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 robb.shec...@gmail.com wrote: On Oct 22, 10:48 am, Robb robb.shec...@gmail.com wrote: Simple permalinks, yes, like:   /weather/report/10/3 But I do *not* see how to create permalinks for large

[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 robb.shec...@gmail.com wrote: so, if I put:  def

[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 craigwest...@googlemail.com wrote: Does anyone know how to implement this? On 22 Oct, 18:27, Frederick Cheung frederick.che...@gmail.com wrote:

[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

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: 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 bad.

[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 able

[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, mdash;) 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 of a literal

[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: meta http-equiv=Content-Type content=text/html; charset=utf-8/ I'm not sure how to inspect the HTTP headers as they're returned from rails, without

[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 s...@livinginthepast.org 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 =

[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 rails-mailing-l...@andreas-s.net 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

[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...

[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 post to this

[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

[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 rails-mailing-l...@andreas-s.net 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

[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 Philip Hallstrom
On Thu, Oct 22, 2009 at 2:03 PM, Peter Laurens rails-mailing-l...@andreas-s.net 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] 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 rails-mailing-l...@andreas-s.net 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

[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 s...@livinginthepast.org 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

[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: 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 rails-mailing-l...@andreas-s.net 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

[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

[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: 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 james.white...@gmail.com wrote: Tried it with an unfrozen rails installstill won't

[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.

[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 bob.sm...@gmail.com and was getting the error. As soon as I stripped the space away with '.strip' before I assigned it to

[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

[Rails] Re: REXML

2009-10-22 Thread Walter McGinnis
On Thu, Oct 22, 2009 at 3:49 PM, Marnen Laibow-Koser rails-mailing-l...@andreas-s.net 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

[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

[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:

[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

[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

[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 post

[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. Any

[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 rails.n...@gmail.com
On Oct 23, 3:15 pm, Sijo k g rails-mailing-l...@andreas-s.net 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

  1   2   >