[Rails] handling errors when separating controllers

2020-03-24 Thread tonypm
something). Tonypm -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion

Re: [Rails] Is there any tool to convet ActiveRecord 2.3.5 statement to sql

2018-04-19 Thread tonypm
For ActiveRecord in Rails 2.3, you can use .construct_finder_sql({}) tonypm On Saturday, 14 April 2018 15:13:15 UTC+1, Hassan Schroeder wrote: > > On Fri, Apr 13, 2018 at 10:13 PM, nyt1972 <nyt...@gmail.com > > wrote: > > > I want to ask Is there any tool to c

[Rails] An application resource called Cables

2017-03-02 Thread tonypm
I have an application which has a resource called cables. But after upgrading to Rails 5.0.1, I can no longer access the cables index page. in the log I get: Started GET "/cables" for 127.0.0.1 at 2017-03-02 12:32:04 + Started GET "/cable/s"[non-WebSocket] for 127.0.0.1 at 2017-03-02

Re: [Rails] categories

2015-11-30 Thread tonypm
Several years ago, I had a similar desire to have a screen representation of a category tree. I was very surprised that I couldn't find any pre-baked solution, so I built my own (there may be one out there now of which I am unaware). Unfortunately, I have never got round to making my code

[Rails] Re: best way to map fields between rails product and an api client product

2015-03-26 Thread tonypm
On Monday, 23 March 2015 17:07:24 UTC, dasibre wrote: I'm not completely certain, but I think you might find some insight by looking at ActiveModel On Tuesday, March 17, 2015 at 10:14:27 AM UTC-4, tonypm wrote: Hi, I am working on building an api client for the Rakuten MarketPlace. I

[Rails] best way to map fields between rails product and an api client product

2015-03-17 Thread tonypm
Hi, I am working on building an api client for the Rakuten MarketPlace. I have got some test requests for add delete update etc working and thought I should aim to structure it as a Gem and publish it so that others can use it/enhance it. I havn't built a Gem before (worked mostly within the

Re: [Rails] Updating Rails 2 to Rails 3 or 4

2014-07-14 Thread tonypm
being upgraded do have up to date tests. I would be interested on any wisdom from others who have already trodden this path. Thanks tonypm On Thursday, 3 July 2014 20:54:59 UTC+1, Rob Biedenharn wrote: On 2014-Jul-3, at 15:49 , Rob Biedenharn r...@agileconsultingllc.com javascript: wrote

[Rails] Re: accessing the changed? method for an overridden attribute - sorry - non question

2013-08-10 Thread tonypm
On Friday, 9 August 2013 18:04:54 UTC+1, tonypm wrote: I am using rails 2.3, and have overridden an attribute. I am building a before_save callback, and would like to check if the attribute has changed - but can't figure out a way to do this. Sorry - silly Friday afternoon question

[Rails] accessing the changed? method for an overridden attribute

2013-08-09 Thread tonypm
I am using rails 2.3, and have overridden an attribute. I am building a before_save callback, and would like to check if the attribute has changed - but can't figure out a way to do this. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] Re: How to create 10000 pseudo data for Testing in RoR

2013-04-14 Thread tonypm
One approach may be to build the data as a large csv. Which you could do from ruby if you wished and you can then keep as a file. Then either import directly to the db with sql or workbench etc. or if you want to stay ruby, load the csv and use ar_extension import to dump the data into the

[Rails] Re: Best IDEs for Ruby on Rails

2013-03-19 Thread tonypm
Redcar completely suits me as a free highlighting editor with a good file browser and multiple display tabs and side by side editing. On Saturday, 16 March 2013 04:40:37 UTC, Jason Hsu, Android developer wrote: What are your favorite IDEs for Ruby on Rails? Are there any good IDEs that

[Rails] Re: [ANN] Ruby Manor 4, London UK, 6th April 2013

2013-01-26 Thread tonypm
fist I've heard of it again this year. What secret society do you need to belong to to get a ticket - lol We'd love to see you there. *I'd love to be there!* In anticipation Tony On Tuesday, 22 January 2013 16:22:34 UTC, James Adam wrote: There's a good chance you've already seen

Re: [Rails] -bash: ruby: command not found

2012-11-03 Thread tonypm
This guide pretty much worked for me as i recall. http://library.linode.com/frameworks/ruby-on-rails-nginx/centos-5 On Thursday, 1 November 2012 16:00:59 UTC, Norbert Melzer wrote: 2012/11/1 keerthi priya emailtoke...@gmail.com javascript:: Thanks Norbert. i have installed ror on cen os . i

[Rails] Re: Rendering a partial with ajax/jquery

2012-10-31 Thread tonypm
I require. I am sorry this is not a direct answer, but hopefully it may help to clarify what you are trying to achieve and how you are going to go about it. Tonypm On Monday, 29 October 2012 23:05:43 UTC, Ruby-Forum.com User wrote: Hi there i have this issue I have a view that render

[Rails] Re: How to use Ajax with rails ?

2012-10-30 Thread tonypm
I have just been reading this and finding it helpful background with some nice examples: http://madebydna.com/all/code/2011/12/05/ajax-in-rails-3.html On Oct 29, 10:41 am, 1334 i...@sipspp.net wrote: On Friday, October 26, 2012 5:38:20 PM UTC+2, Fahim Patel wrote: Hi all,    Can any one

[Rails] Re: IDE

2012-10-10 Thread tonypm
I switched to Redcar a while ago and whilst not the fastest tool out of the box, it is actually pretty good. Being still in development, it still has a few bugs. It can be a bit fiddly to set up since it needs a java runtime. It is a bit slow on startup, and can lose track of which window

Re: [Rails] Which Framework will improve my Ruby Skills?

2012-09-04 Thread tonypm
What I actually find most important is being able to do a well worded google search (I sometimes wonder if there should be a qualification for that in itself lol?). The Ruby and the Rails forums are very friendly and helpful. I usually start a google search with Ruby or Rails and the

[Rails] Re: Ruby Koans

2011-09-13 Thread tonypm
Just started going through - it is nice - thanks for the info! -- 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 from this group, send email to

[Rails] Re: Rich text editor?

2011-04-20 Thread tonypm
Correction, just checked and doesn't look like I used a plugin so can't say how good plugin is! On Apr 20, 8:24 am, tonypm tonypmar...@hotmail.com wrote: I have used CKEditor for some time with no problems,  I have one page with several editor instances and it works fine. There is a rails

[Rails] Re: model with no primary key

2011-03-18 Thread tonypm
On Mar 17, 11:04 am, Frederick Cheung frederick.che...@gmail.com wrote: Could you just tell rails that categories_id is the primary key? If it's unique then that should be good enough (you'll probably have to be a little careful when creating rows in this table though, as you'll need to set

[Rails] model with no primary key

2011-03-17 Thread tonypm
Hi, I have looked around quite a bit, and haven't found any workable solution to this. I am accessing an external/remote database from my rails app, in order to update a categories table. I cannot change the table structure of the remote database. it has a categories table with an id field

[Rails] Re: Which editor to use

2011-02-18 Thread tonypm
It is funny. The last time I followed a long thread about rails editors, the enthusiasm seemed to be for emacs. So I installed it and got used to it. It has some very good features, the first time I installed it I had trouble setting up the packages I needed for rails/ haml etc. But recently

[Rails] Re: Is Ruby on Rails for beginner programmers?

2010-10-23 Thread tonypm
to something I am trying to solve. hope this encourages you Tonypm -- 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 group, send email to rubyonrails-talk

[Rails] Re: Formatting Names and Addresses

2010-10-18 Thread tonypm
Would the Snail gem help? Thanks Marnen, looks like it may be of use, or at least a starting point. I'll play with it and see Thanks Tonypm -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email

[Rails] Formatting Names and Addresses

2010-10-14 Thread tonypm
such as Initials in caps etc. I know this is not strictly Rails, but it is for a rails project and I couldn't think of another forum that I could pose this question on. Tonypm -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

[Rails] Re: How old are you?

2010-10-12 Thread tonypm
are discussed and appreciate links to useful resources. (thanks to those who contribute) Finding time to keep up with changes as well as doing actual development is quite a stretch. Tonypm -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group

[Rails] Re: free ruby on rails hosting?

2010-10-06 Thread tonypm
feeling these things for several weeks now, and my disappointment in the rails community has been growing. This post just tipped the balance so I felt I had to make a comment. with very best intentions Tonypm -- You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: Need an online payment system - suggestions required

2010-09-11 Thread tonypm
? Monthly billings, etc? Any additional information will be appreciated. This question interests me too. Strange not to have got any response to this- I wonder how many people have actually implemented a payment gateway on a rails site - it doesn't seem to appear in posts lately.. Tonypm

[Rails] Re: File creation in Rails

2010-08-03 Thread tonypm
been saved to the database def save_file(filename) File.open #{RAILS_ROOT}/tmp/#{filename}, 'w' do |f| f.write contents end end Tonypm -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email

[Rails] Re: ajax and redirect

2010-06-09 Thread tonypm
for the controls and one for the results, using render :update Tonypm -- 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 group, send email

[Rails] Re: Can a dropdown be used to select additional form fi

2010-06-09 Thread tonypm
on the select which would cause the required partial to be displayed. Using this approach keeps the server in control of what is being displayed. Tonypm -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email

[Rails] Re: One Array - 3 Columns of Equal Length

2010-05-31 Thread tonypm
in_groups and in_groups_of part of rails api - hadn't spotted those before and would never have thought of looking for them. I often wonder how many other useful little goodies I may be missing. Always useful to keep an eye on this group. thanks Marnen -- You received this message because

[Rails] Re: Rails default date format

2010-05-23 Thread tonypm
There is also validates_date_time plugin http://agilewebdevelopment.com/plugins/validates_date_time if you also want to allow entry in other formats Tonypm -- 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: Ubuntu Linux Editor / Prettiefier

2010-05-03 Thread tonypm
is working well, and switching between buffers to re run commands etc is now becoming much more automatic. I just need to learn to resist the temptation to pick up the mouse! Tonypm -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

[Rails] Re: Ubuntu Linux Editor / Prettiefier

2010-04-27 Thread tonypm
. Thanks Greg that is perfect - somehow I had completely missed that. I notice now that the tutorial describes C-w but does not mention M-w Tonypm -- 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

[Rails] Re: Ubuntu Linux Editor / Prettiefier

2010-04-27 Thread tonypm
I switch buffers using the arrow keys most of the time. Ctrl + x, and then left or right arrow. Thanks that helps (I notice you can also left and right click on the buffer name in the status bar) Tonypm -- You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: Ubuntu Linux Editor / Prettiefier

2010-04-27 Thread tonypm
. Tonypm -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit

[Rails] Re: Ubuntu Linux Editor / Prettiefier

2010-04-23 Thread tonypm
they do give an overview of what is possible. I havn't yet found a quick way to duplicate a line or series of lines eg alt+ctl+down arrow in netbeans - if anyone can enlighen me I would be grateful. Tonypm -- You received this message because you are subscribed to the Google Groups Ruby on Rails

[Rails] Re: api.rubyonrails.org site is taken over by a domain squatter

2010-04-22 Thread tonypm
Thanks - it may have only been a short time, but I was missing the guides. -- 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 group, send email

[Rails] firefox 3.6 not caching css and js files

2010-04-21 Thread tonypm
anyway. This does not happen with IE or firefox on linux or mac. But firefox seems to be ok with other web sites, so I still have to suspect something with my setup, but don't really know what to look for. Tonypm -- You received this message because you are subscribed to the Google Groups

[Rails] Re: regular expression

2010-03-31 Thread tonypm
don't mind admitting to being dumb! Thanks Tonypm -- 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 group, send email to rubyonrails-talk+unsubscr

[Rails] Re: Trying to create search filter persistence using SearchLogic

2010-03-16 Thread tonypm
for me and I have done my best to minimise and standardise the code in the controller. I hope it may at least give you some ideas or provoke some other responses. Tonypm -- 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: rjs replace_html with a partial select box not working

2009-12-16 Thread tonypm
is it that :prompt needs a string ? Tonypm -- 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 group, send email to rubyonrails-talk+unsubscr

[Rails] mysql character set = UTF-8 on a cloumn in a migration

2009-12-16 Thread tonypm
Hi, I want to change a single table field to UTF-8, but cant see a way of defining this in a migration. Does anyone know if there is a way, or if it has to be an sql snippet, how would I add that? Thanks Tony -- You received this message because you are subscribed to the Google Groups Ruby

[Rails] mysql error with named_scope and any?

2009-07-13 Thread tonypm
`.id WHERE ((`orders`.batch_id = 1479)) So am I doing something bad with my named_scope?? Thanks for any help Tonypm --~--~-~--~~~---~--~~ 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: Line Length limit in posts

2009-06-29 Thread Tonypm
Sorry should have said I access the forum via browser on groups.google.com Tonypm --~--~-~--~~~---~--~~ 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

[Rails] rake test:integration appears to load routes twice

2009-06-28 Thread tonypm
Whilst trying to find out why I was having problems running Webrat, I put a puts into the routes file to see when it was loaded, and noticed it gets loaded twice. Is there any problem with this. It only happens with rake, not if running the test directly. for a large routes folder, it would

[Rails] Re: will_paginate and remember checkboxes

2009-06-26 Thread Tonypm
of thing that might make a plugin, but I don't have experience in that at the moment, and the whole thing still needs a bit of cleaning up. If I can get it cleaned up in my apps, I may try to put some time aside to make it a plugin. Tonypm --~--~-~--~~~---~--~~ You

[Rails] Line Length limit in posts

2009-06-26 Thread tonypm
should ask Rachel Tonypm --~--~-~--~~~---~--~~ 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 from this group, send email

[Rails] Re: admin link in application helper

2009-06-25 Thread Tonypm
. It simplifies the process since the paths don't need to be edited. But then admin wont appear or be required in the url. Tonypm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group

[Rails] Re: newbie need help

2009-06-23 Thread Tonypm
it is the best way, so start with a book that will help you do that. Having said that, I do have a selection of the books mentioned and they are indeed worthwhile. You just have to decide which you need to get started. hth Tonypm --~--~-~--~~~---~--~~ You received

[Rails] Re: Display Block Conditionally

2009-06-21 Thread Tonypm
steve that's the first outline of erb I have seen. Either it doesn't get discussed a lot, or it is discussed in places I don't visit. Anyway, although I had a broad idea of what was going on under the bonnet, I had never really seen a clear example of an erb template in action. I use haml,

[Rails] Re: assert_valid in unit tests after upgrade to rails 2.3 doesn't work

2009-05-29 Thread Tonypm
hi, just upgrading to 2.3.2 and getting same, did you resolve this at all? Tonypm --~--~-~--~~~---~--~~ 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

[Rails] Re: assert_valid in unit tests after upgrade to rails 2.3 doesn't work

2009-05-29 Thread Tonypm
2.0.2 to 2.3 so had not seen the dep error. def assert_valid(record) assert record.valid?, record.errors.full_messages.join(\n) end Tonypm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group

[Rails] Re: Workling not outputting to production.log

2009-04-11 Thread Tonypm
Albert, thank you so much for this info. I have posted this quation twice and not received a response. Tried it and it is the solution. It has been irritating me for a while, but I just haven't had time to investigate it. Many thanks Tonypm

[Rails] Re: What's 'logger', really

2009-04-09 Thread Tonypm
i find I cant send to logger in production mode if I am running a script/runner on a model method. Works in development mode, must be a reason for this although I cant figure it Output just seems to go nowhere Tonypm --~--~-~--~~~---~--~~ You received

[Rails] logger for script/runner or console in production mode

2009-03-30 Thread tonypm
be missing some obvious point here. Tonypm --~--~-~--~~~---~--~~ 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 from this group

[Rails] Re: Redbox basic implementation question

2009-03-06 Thread Tonypm
, but the change I made has worked ok for me with firefox at least (it has to go in the redbox.js in the public folder). You may want to look into the code in a bit more depth if you may be supporting other browsers. Tonypm --~--~-~--~~~---~--~~ You received this message

[Rails] Re: Association through 2 intermediate Models

2009-02-27 Thread Tonypm
that the through is in place at each level, but to no avail. Perhaps someone may be able to enlighten us. Tonypm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email

[Rails] Re: How do I access a variable defined in application.rb from within application.rhtml?

2009-02-25 Thread Tonypm
hi, Ruby pocket reference looks useful, think I'll order a copy. Regarding the class method, just wondering when/how this method should get called. Tonypm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby

[Rails] can this be done without using find_by_sql

2009-02-14 Thread tonypm
in ActiveRecord terms. Here is an example, I am guessing this can be done without using find_by_sql Repair has_many :notes SELECT * FROM repairs where exists (select * from notes where repairs.id=notes.repair_id and and notes.flagged) Thanks Tonypm

[Rails] Re: Suggestions for a rails webhost...

2009-02-14 Thread tonypm
Peter, The dramatic improvement in ping time does make quite a difference to be honest, Confirms what I was what I was wondering about. Had a look at bytemark, they look worth following up. Thanks Tonypm --~--~-~--~~~---~--~~ You received this message

[Rails] Re: can this be done without using find_by_sql

2009-02-14 Thread tonypm
a dynamic scope (thanks to railscasts) I can do: scope.flagged_repairs.paginate(:page=page, :per_page=per_page) And it all appears to work!! Incredibly neat Tonypm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: can this be done without using find_by_sql

2009-02-14 Thread tonypm
the ActiveRecord SQL generation magic. Thanks to all Tonypm --~--~-~--~~~---~--~~ 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

[Rails] Re: Suggestions for a rails webhost...

2009-02-02 Thread tonypm
Some helpful comments here. Does anyone have any experience using these from the UK. Tonypm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email

[Rails] Re: best way to store this data in the database

2009-01-05 Thread tonypm
I tend these days to always use the full descriptive words - memory implications are small, but it is easier to directly display the value than have code to expand it wherever it is used. It also tends to make the code logic easier to follow. tonypm

[Rails] Re: What to call Rails + merb

2008-12-27 Thread tonypm
How about RaiMer --~--~-~--~~~---~--~~ 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 from this group, send email to

[Rails] Re: What to call Rails + merb

2008-12-27 Thread tonypm
Using Rails relies heavily on googling - so my vote would go for naming it something pretty unique. I've done a lot of reading about railway track engineering over the recent years. Tonypm --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Rails] Re: report generation

2008-12-10 Thread tonypm
of a pdf file format. It is a bit fiddly to use, but is not bad, once you have got your head round how to layout various elements. The table format can be a bit limited. (A new pdf creator called prawn is under development which). Tonypm --~--~-~--~~~---~--~~ You

[Rails] Re: what's the smallest device to do Rails development on???

2008-12-03 Thread tonypm
at anytime. Touch typing on the keyboard is possible and actually require less finger movement which as you get used to is less RSI risk. Mostly though I just plug in a usb kb and mouse. Tonypm --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Rails] Re: Disabling observe_form AJAX request on submit button click?

2008-11-04 Thread tonypm
it by using field observers instead. It seemed like the focus iinternally in the form was in a virtual submit button. If I add a normal text field, the problem goes away. Tonypm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: interacting select_tags using onchange

2008-10-23 Thread tonypm
Tonypm --~--~-~--~~~---~--~~ 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 from this group, send email to [EMAIL PROTECTED

[Rails] Re: Memory Leak

2008-10-12 Thread tonypm
Thanks Fred, Fedora updated Ruby to: ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-linux] problems now all gone away - much relieved!! Tonypm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk