[Rails] Re: Routing, use parts of entered url as id / perma

2009-06-18 Thread Rick
I think you should be looking at your models here - both Customer and Partner look like candidates for a has_and_belongs_to_many association with Feature, Screenshot, and Order. Once you get this sorted the routes you are interested should come naturally out of your various controller methods.

[Rails] Re: Odd error with file_column and relative_path

2009-06-18 Thread Rick
You might also consider attachment_fu (de other facto :-) as a viable replacement for FileColumn. On Jun 18, 10:17 am, Nicholas Henry nicholas.he...@gmail.com wrote: Check out the documentation: * in a view, %= url_for_file_column 'entry', 'image' % will create an URL to access the  

[Rails] Re: File upload?

2009-06-18 Thread Rick
Either of these will work: http://www.jumbabox.com/2008/06/attachment_fu-tutorial/ http://jimneath.org/2008/04/17/paperclip-attaching-files-in-rails/ On Jun 18, 1:23 pm, Ronny Fauth jadefalk...@imperium-noctem.de wrote: Hi, does someone has an tutorial for file-upload that works with rails

[Rails] Re: Active resource record relationships

2009-06-19 Thread Rick
You might take a look at: http://guides.rubyonrails.org/ Once you get there follow the links to the different Model topics, in particular check out: http://guides.rubyonrails.org/association_basics.html On Jun 19, 11:52 am, Jedrin jrubia...@gmail.com wrote: I tried to work out an active

[Rails] Re: Active resource record relationships

2009-06-21 Thread Rick
Right. You might want to look at Chap 15 in The Rails Way, Obie Fernandez et.al., 2008. It covers XML and ActiveResource - only 27 pages but the best I've been able to find to date. I'm assuming that what you mean by complex relationships is the A...Resource parallel to associations in

[Rails] Re: Active resource record relationships

2009-06-24 Thread Rick
I'm not sure I understand what you're trying to accomplish but here's instructions for a has_and_belongs_to_many example which also provides an ActiveResource (xml) feed. Assumptions: Ruby 1.8.7 Rails 2.3.2 sqlite3 1) run: rails simple_test cd simple_test 2) run:

[Rails] Simple hopefully, newbish question, but how come it's saying starting in Rails 2.2.2 when I'm using 2.3.2 ?

2009-07-02 Thread Rick
I'm trying to get this app I have (I actually started it over fresh) to start up with rails 2.3.2 rick- ~/projects/rails/hockey $ sudo gem install rails -v 2.3.2 Password: Successfully installed rails-2.3.2 1 gem installed rick- ~/projects/rails/hockey $ sudo rake rails:update (in /Users/rick

[Rails] Re: Simple hopefully, newbish question, but how come it's saying starting in Rails 2.2.2 when I'm using 2.3.2 ?

2009-07-02 Thread Rick
environment variable removed and no, nothing in vendor (except an empty plugins diretory) and yet still when it starts up it says 2.2.2 On Thu, Jul 2, 2009 at 5:38 PM, Conrad Taylor conra...@gmail.com wrote: On Thu, Jul 2, 2009 at 2:19 PM, Rick ric...@gmail.com wrote: I'm trying to get

[Rails] Re: Simple hopefully, newbish question, but how come it's saying starting in Rails 2.2.2 when I'm using 2.3.2 ?

2009-07-02 Thread Rick
and it still gives me the same message Even doing rake rails:update says: (in /Users/rick/projects/rails/hockey) Missing the Rails 2.2.2 gem. Please `gem install -v=2.2.2 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out

[solved i guess] Re: [Rails] Re: Simple hopefully, newbish question, but how come it's saying starting in Rails 2.2.2 when I'm using 2.3.2 ?

2009-07-02 Thread Rick
. Oh well, it's working now. Thanks for the patience. On Thu, Jul 2, 2009 at 7:32 PM, Rick ric...@gmail.com wrote: Ok now this is getting more frustrating. I did a gem cleanup and now I only have one version of rails installed: gem list --local rails *** LOCAL GEMS *** rails (2.3.2

[Rails] Re: rake db:create == Protocol error

2009-07-03 Thread Rick
Have you created the library_development, library_test, and library_production databases? These need to be in place in mysql prior to any db:migrate calls. On Jul 2, 4:09 pm, Greg dartg...@googlemail.com wrote: Hi, I'm attempting to follow this tutorial:

[Rails] I'm stumped by this stupid newbie error I'm seeing... trying to figure out where to look next... (undefined method xxx_path )

2009-07-03 Thread Rick
On one of my new.html.erb files backed by a matches_controller I'm getting the error: undefined method `matches_path' for #ActionView::Base:0x2cfc748 I don't understand where to start looking to try to understand why I'm getting this error. Even if I back everything out of the page and just

[Rails] If storing duration as integer seconds... question on building a helper

2009-07-05 Thread Rick
Ok, I'm new to rails (and Ruby)... I'm trying to figure out the best practice for handling a duration field (for example time it takes someone to run a mile. ) All I care about is seconds (not milliseconds) so figured I'd store the field as an integer. I want to allow the user to enter in the

[Rails] Re: If storing duration as integer seconds... question on building a helper

2009-07-05 Thread Rick
Time.parse ? I would think this would come up quite often so there must be a best practice or easy way to handle this kind of thing. Thanks in advance -- Rick R --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: If storing duration as integer seconds... question on building a helper

2009-07-06 Thread Rick
On Mon, Jul 6, 2009 at 2:52 PM, s.rosscwdi...@gmail.com wrote: On Jul 5, 2009, at 8:44 PM, Rick wrote: I currently decided to just use something like: def time_to_seconds time_display     time = time_display.split(:)     seconds = 0     modifiers = [ 1, 60, 360

[Rails] Quick simple check: Very simple relationship setup (newbish for sure.)

2009-07-10 Thread Rick
Been googling trying to understand belongs_to, has_one, etc For this scenario: 'A Person has a single favorite color and has multiple addresses. (Colors are reused across all the persons, addresses are always unique only for one person)' Would the following suffice? (not worrying about adding

[Rails] Re: Quick simple check: Very simple relationship setup (newbish for sure.)

2009-07-10 Thread Rick
on the Address model? -- Rick R --~--~-~--~~~---~--~~ 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: Quick simple check: Very simple relationship setup (newbish for sure.)

2009-07-10 Thread Rick
to see what you have before you implement things to make sure they work well. -- Posted via http://www.ruby-forum.com/. -- Rick R --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group

[Rails] Re: Quick simple check: Very simple relationship setup (newbish for sure.)

2009-07-10 Thread Rick
. -- Posted via http://www.ruby-forum.com/. -- Rick R -- Rick R --~--~-~--~~~---~--~~ 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: Need some help with a model query

2009-07-11 Thread Rick
On Sat, Jul 11, 2009 at 12:30 PM, Frederick Cheungfrederick.che...@gmail.com wrote: Now I want to retrieve the team_id for the (opponent) inside the schedules table.  Each team plays approx. 12 opponents.  So, I would like to use an each statement to retrieve that bit of data at the same

[Rails] Re: Odd problem with templates

2009-07-12 Thread Rick
Hello John, How about showing us your template? I've used template to drive restful-authentication and finished the template with a rake db:migrate to create the necessary tables. As r-a has many options, perhaps it would be helpful if you post your template. On Jul 12, 2:38 am, JDS no spam

[Rails] Ideas why this rake task isn't saving one of my models?

2009-07-12 Thread Rick
Newbie here working on an application that has a Match model and each Match can have some Playergame models. The rails apps is actually working, but I needed to now import some initial data from a csv file, so I built a rake task to handle the import. The problem is that for some reason I can't

[Rails] Re: Ideas why this rake task isn't saving one of my models?

2009-07-12 Thread Rick
! now. thanks. On Sun, Jul 12, 2009 at 10:14 PM, Frederick Cheungfrederick.che...@gmail.com wrote: On Jul 13, 3:02 am, Rick ric...@gmail.com wrote: On Sun, Jul 12, 2009 at 9:50 PM, JangoSteveschwartz.st...@gmail.com wrote: Good point, about saving the games first,  but I'm curious, what the heck

[Rails] Re: Ideas why this rake task isn't saving one of my models?

2009-07-12 Thread Rick
On Sun, Jul 12, 2009 at 9:50 PM, JangoSteveschwartz.st...@gmail.com wrote: I'm not sure this is what is causing your problem, but according to your models, a Match has_many Playergames, which would mean that each Playergame has a match_id, correct? However, in your script, you are saving the

[Rails] Re: I have a big problem

2009-07-14 Thread Rick
On Wed, Jul 15, 2009 at 12:24 AM, Aaron Day rails-mailing-l...@andreas-s.net wrote: No database content shows in Internet Explorer! It works on other major browsers but not IE. What do I do? Saying no database content I would think is completely irrelevant. I'm totally new to rails, but

[Rails] Re: I have a big problem

2009-07-14 Thread Rick
Also: http://db.tidbits.com/article/5386 See point 5. On Wed, Jul 15, 2009 at 12:32 AM, Rick ric...@gmail.com wrote: On Wed, Jul 15, 2009 at 12:24 AM, Aaron Day rails-mailing-l...@andreas-s.net wrote: No database content shows in Internet Explorer! It works on other major browsers

[Rails] Re: has_and_belongs_to_many - help?

2009-07-15 Thread Rick
;width:100px' %br % end % Any help is much appreciated. -- Posted via http://www.ruby-forum.com/. -- Rick R --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group

[Rails] Re: has_and_belongs_to_many - help?

2009-07-15 Thread Rick
Could you also paste your models and migrations? On Wed, Jul 15, 2009 at 3:30 PM, Rick ric...@gmail.com wrote: I'm new to rails and will be interested how this works out, so I'll be watching this thread. What errors are you getting? On Wed, Jul 15, 2009 at 6:12 AM, Rails List rails

[Rails] Re: has_and_belongs_to_many - help?

2009-07-15 Thread Rick
/. -- Rick R --~--~-~--~~~---~--~~ 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 rubyonrails-talk

[Rails] Re: mysql error on server

2009-07-15 Thread Rick
On Wed, Jul 15, 2009 at 5:09 PM, Kieran Mcgrady rails-mailing-l...@andreas-s.net wrote: uninstall mysql following these steps: 1. Open Terminal 2. sudo nano /etc/hostconfig 3. Delete the following line: MYSQLCOM=-YES- 4. CTRL+x 5. y 6. CTRL+m 7. Make sure MySQL

[Rails] [OT] Becoming incorporated? Few quick questions, S-Corp fine, etc?

2009-07-18 Thread Rick
pay me at a later date rather than weekly until the name gets registered. I'm just hoping this doesn't take a long time to process.) Thanks for any advice. -- Rick R --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: [OT] Becoming incorporated? Few quick questions, S-Corp fine, etc?

2009-07-19 Thread Rick
On Sun, Jul 19, 2009 at 9:47 PM, Rob Biedenharn r...@agileconsultingllc.comwrote: On Jul 18, 2009, at 8:24 AM, Rick wrote: Second, you need to be very aware of what kind of employment agreement you have with your W-2 employer. Some agreements effectively make any work you do the intellectual

[Rails] Re: Concerns about multiple model queries and array management

2009-07-19 Thread Rick
On Sun, Jul 19, 2009 at 10:01 PM, Älphä Blüë rails-mailing-l...@andreas-s.net wrote: http://pastie.org/551660 I haven't investigated all of this, and I'm coming from a Java/Groovy background and new to Rails, but when I see 120.times to me it throws up a red flag. Can't you make this more

[Rails] Re: Concerns about multiple model queries and array management

2009-07-20 Thread Rick
Why don't you just set the model up where you find Teams and each Team has a collection of Team objects called 'opponents'? It would seem to be a lot easier to me this way. On Mon, Jul 20, 2009 at 9:07 AM, Älphä Blüërails-mailing-l...@andreas-s.net wrote: That shows me all the team_ids listed

[Rails] Re: Equipment_URL Failed to Generate (new_equipment_path)

2009-07-20 Thread Rick
The error message is spot on (except that is says you may...) as you have problems with your routes. Try running script/generate scaffold Machine name:string and the follow-on rake db:migrate and rake routes. Look at the difference between the routes generated for Equipment/Equipment and

[Rails] Re: How to Disable Pluralization

2009-07-20 Thread Rick
Before you do anything extreme, try this (example from previous post). script/generate scaffold Equipment name:string kind:string Then see what happens when you go: http://localhost:3000/equipment/new Equipment is a word that behaves just as you'ld like with singular (equipment) ==

[Rails] Re: Concerns about multiple model queries and array management

2009-07-22 Thread Rick
Everyone and everything I read, including you both (Rick and Marnen) say that large queries are much better than smaller queries. What if I want to query everything from all models listed here, assign them to a team object so that I can reference them by the team object. How would I do

[Rails] Re: replace special chars with new special char

2009-07-24 Thread Rick
str = String.new(ler-2545654-45-an-audience-with--- corporate_counsel) = ler-2545654-45-an-audience-with---corporate_counsel str.sub('-', '/').sub('-', '/').sub('-', '/') = ler/2545654/45/an-audience-with---corporate_counsel On Jul 24, 2:50 am, Priya Buvan rails-mailing-l...@andreas-s.net

[Rails] Re: Equipment_URL Failed to Generate (new_equipment_path)

2009-07-26 Thread Rick
the inflections.rb file, the fact that this is the magic that makes equipment work will be forgotten long before you do your taxonomy project on moose variants. I really hope this is helpful. Rick On Jul 25, 4:57 pm, Marnen Laibow-Koser rails-mailing-l...@andreas- s.net wrote: Ben Wilson wrote

[Rails] Re: Problem understanding scaffolds

2009-07-26 Thread Rick
Laim, Scaffold will do it all (in a cookie cutter way), if given the right arguments. script/generate scaffold User name:string profile:text NOTE:^ ^ This single command will create a controller, model, views, and db/ migration for the User model

[Rails] Re: replace special chars with new special char

2009-07-28 Thread Rick
you're welcome On Jul 27, 1:08 am, Priya Buvan rails-mailing-l...@andreas-s.net wrote: HiRick, Thank you very much. That works fine. Thanks alot. Regards, PriyaBuvan -- Posted viahttp://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message

[Rails] Re: how to set smpt server for our rails applicaion

2009-07-28 Thread Rick
Don't use environment.rb, use instead: config/initializers/ action_mailer.rb. Set it to read: ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.smtp_settings = { :address = localhost, :port = 25, :authentication= :login, :user_name =

[Rails] Re: Complex finds - part 2

2009-07-28 Thread Rick
Check out http://github.com/ezmobius/ez-where/tree/master. Most recent change activity is Feb 2009 - Rails 2.2. Looks to be the same Ezra and it might be a better place to start from. On Jul 28, 3:39 pm, Craig White craigwh...@azapple.com wrote: I am learning new, was comfortable with 1.2.x

[Rails] Re: How secure are sessions?

2009-07-29 Thread Rick
You could start here: http://www.rorsecurity.info/, download and read the book. On Jul 29, 9:26 am, Patrick Doyle wpds...@gmail.com wrote: I have read a number of different tutorials that talk about adding a login page to an application that all contain very similar wording: Of course, you

[Rails] Re: table does not exist

2009-07-29 Thread Rick
On Jul 29, 10:09 am, RVince rvinc...@hotmail.com wrote: I am creating a db in rake, and I have it all set up in migrations. I notice that the schema.rb contains the code for creation of a parituclar table. However, when I rake it, I get blah blah table does not exist. blah blah table does

[Rails] Re: Rails 2.3.x and active_scaffold Installation

2009-07-30 Thread Rick
What version of Ruby are you running? On Jul 30, 7:22 am, seenu desaise...@gmail.com wrote: No, i don't know exactly if it work with rails 2.3.3 Thanks On Jul 30, 3:57 pm, Conrad Taylor conra...@gmail.com wrote: On Thu, Jul 30, 2009 at 3:49 AM, seenu desaise...@gmail.com wrote: Hi,

[Rails] Re: Data Modeling (sorry - sort of long)

2009-07-30 Thread Rick
, and have fun Rick --~--~-~--~~~---~--~~ 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: script/plugin install with github

2009-07-30 Thread Rick
What version of ruby are you using? On Jul 30, 12:25 pm, joelmahoney joelmaho...@gmail.com wrote: Hello, since switching from svn to git, I'm having trouble using script/ plugin install with github plugins. here's what happens: script/plugin install

[Rails] Re: script/plugin install with github

2009-07-30 Thread Rick
Based on what I'm seeing when I run here: /test1.8 92 script/plugin install git://github.com/thoughtbot/paperclip.git Initialized empty Git repository in /Users/rick/test1.8/vendor/plugins/ paperclip/.git/ remote: Counting objects: 67, done. remote: Compressing objects: 100% (56/56), done

[Rails] Re: script/plugin install with github

2009-07-30 Thread Rick
Based on what I'm seeing here: /test1.8 92 script/plugin install git://github.com/thoughtbot/paperclip.git Initialized empty Git repository in /Users/rick/test1.8/vendor/plugins/ paperclip/.git/ remote: Counting objects: 67, done. remote: Compressing objects: 100% (56/56), done. remote: Total

[Rails] Re: script/plugin install with github

2009-07-30 Thread Rick
: thanks Rick - I will dig deeper in the git documentation - maybe reinstall git altogether (though I installed with macports, so I don't know what the problem would be...) one question: when you say I might have a git repository local for paperclip, what do you mean exactly? Joel On Jul 30

[Rails] Re: Missing mislav-will_paginate

2009-08-01 Thread Rick
Here's something you might want to consider. Create a gem configuration named: ~/.gemrc Here's the contents of mine (NOTE: the --- line is part of the file): --- :update_sources: true :sources: - http://gems.rubyforge.org - http://gems.github.com :verbose: true :bulk_threshold: 1000

[Rails] Re: ScITE Question

2009-08-17 Thread Rick
Have you asked here: http://groups.google.com/group/scite-interest On Aug 17, 6:13 am, Young Ben nzcall...@gmail.com wrote: I'm a newbie am just learning to use Ruby. I've chosen ScITE as my editor. So far so good, writing scripts then executing them inside ScITE using 'F5'. when I run

[Rails] Re: First App- Error 500

2009-08-19 Thread Rick
PS . It does show the default web page ok athttp://localhost:3000 just not the app It doesn't show the app because you don't actually have one. You should read what you see at http://localhost:3000. Specifically, steps 1, 2, and 3 in the main panel give you some obvious tips on what's

[Rails] Re: First App- Error 500

2009-08-19 Thread Rick
with what goes where. Try this: script/generate scaffold User name:string profile:text Now check for new files in app\controllers, app\views, app\models, and db\migrations Then run: rake db:migrate And restart your webserver and browse: http://localhost:3000/users Rick On Aug 19, 10:17 am

[Rails] Re: help with libxml

2009-08-19 Thread Rick
Loading development environment (Rails 2.3.3) require 'xml' require 'xml' = [] doc = XML::Document.file(public/my.xml) = ?xml version=1.0 encoding=UTF-8? top first second /second /first /top nodes = doc.find('/top/first') = #LibXML::XML::XPath::Object:0x282c3bc nodes.each do

[Rails] Re: How to get current time including milliseconds for div id?

2009-08-19 Thread Rick
You want to use Time.now.to_f if you're worried about more than one hit per second. On Aug 19, 11:44 am, Maurício Linhares linhares.mauri...@gmail.com wrote: Time.now.to_i - Maurício Linhareshttp://codeshooter.wordpress.com/|http://twitter.com/mauriciojr On Wed, Aug 19, 2009 at 12:35

[Rails] Re: First App- Error 500

2009-08-19 Thread Rick
ok, so just to be complete, what do you get when you type: rake routes On Aug 19, 2:13 pm, mgpowers gmichae...@hotmail.com wrote: I've changed the view name to greeting.html.erb as suggested but SAME results.. I was jusing the book Beginging Ruby on Rails and looking at the online

[Rails] Re: Anything but Aptana

2009-08-26 Thread Rick
My personal favorite is emacs with emacs-rails package. Well worth a look if you want a development environment that you can carry with you through time and computer changes. For example, I started using emacs as a C development platform on VMS in 1979 (DEC Vax - prehistory) and have used it

[Rails] Re: should this work? - validates_inclusion_of :start_date, :in = (Time.now.to_date - 100.years)..(Time.now.to_date + 100.years)

2008-11-22 Thread Rick
Is Louie) somehow doesn't look right, does it? You're doing :in = (Sun, 22 Nov 1908)..(Sun, 22 Nov 2108) which just isn't going to happen. Try converting to Julian days, that way you'll be bounded with two positive integers. Rick On Nov 21, 8:08 pm, Greg Hauptmann [EMAIL PROTECTED] wrote: I've

[Rails] Re: should this work? - validates_inclusion_of :start_date, :in = (Time.now.to_date - 100.years)..(Time.now.to_date + 100.years)

2008-11-22 Thread Rick
Greg - you might take a look at time_with_zone.rb in ActiveSupport - I'm looking at 2.2.0 but I know it's in 2.1.2 as well. a = Time.now a.is_a?(Time) = true a = My name is Fred a.is_a?(Time) = false Maybe closer to what you need? Rick On Nov 22, 1:04 am, Rick [EMAIL PROTECTED] wrote: Right

[Rails] Re: Rakismet revisited :(

2008-11-23 Thread Rick
Application root/Users/rick/test212 Environment development Database adaptersqlite3 Database schema version 0 I'm assuming that C:/DEVELOPMENT/osc is the root of your rails application. You might try adding the -v option to plugin to see if you can get more information

[Rails] Re: Destroy method not working (routing question)

2008-11-23 Thread Rick
: %= link_to 'delete', products_path(product), :method = :delete, :confirm = 'Are you sure?' % Rick On Nov 23, 8:24 am, cardinallijr [EMAIL PROTECTED] wrote: Hi all, I'm trying to implement an admin control panel for my application and everything seems to work fine, except when I try to call

[Rails] Re: Destroy method not working (routing question)

2008-11-23 Thread Rick
This might actually work :-) %= link_to 'delete', admin_products_path(product), :method = :delete, :confirm = 'Are you sure?' % Rick On Nov 23, 12:40 pm, Rick [EMAIL PROTECTED] wrote: Hello Alberto, In your view, what are you trying to say with [:admin, product]. Is it perhaps

[Rails] Re: Problems installing mysql gem in Windows Vista

2008-11-23 Thread Rick
. That sounds like option 3, above. Rick On Nov 23, 2:35 pm, Schalk Neethling [EMAIL PROTECTED] wrote: Hey all, The problems keep coming. Having upgraded everything and upgraded to Rails 2.2.2 I now wanted to install the MySQL gem as I am getting the following error when trying to load up

[Rails] Re: Rakismet revisited :(

2008-11-24 Thread Rick
/Users/rick/ test212/vendor/plugins/rakismet removing: /Users/rick/test212/vendor/plugins/rakismet/.git Initialized empty Git repository in /Users/rick/test212/vendor/plugins/ rakismet/.git/ remote: Counting objects: 45, done. remote: Compressing objects: 100% (34/34), done. remote: Total 45 (delta

[Rails] Re: Best approach for importing data from a file

2008-11-24 Thread Rick
BY ',' OPTIONALLY ENCLOSED BY + # LINES TERMINATED BY '\n' + fields end def self.down drop_table :state_abbrevs end end So many buttons and so little time, Rick On Nov 13, 5:11 am, RichardOnRails [EMAIL PROTECTED] wrote: HiRick, I've been busy, so I haven't checked

[Rails] Re: should this work? - validates_inclusion_of :start_date, :in = (Time.now.to_date - 100.years)..(Time.now.to_date + 100.years)

2008-11-24 Thread Rick
:start_date is the name of one of your records fields and is a member of the Time class. Sorry if my confused meander wasted too much of your time. Thanks for your help Fred. Rick On Nov 22, 1:52 pm, Greg Hauptmann [EMAIL PROTECTED] wrote: thanks - I'm specifically looking at Dates so I might stick

[Rails] Re: Destroy method not working (routing question)

2008-11-24 Thread Rick
Hey Alberto, Take a look at this site, I think it's pretty close match to what you are trying to accomplish: http://icebergist.com/posts/restful-admin-namespaced-controller-using-scaffolding Rick On Nov 24, 2:19 am, Ryan Bigg [EMAIL PROTECTED] wrote: The link should be: %= link_to Delete

[Rails] Re: Absolute Beginner -- having much trouble getting started

2008-11-25 Thread Rick
Hello Garrett, You might also check this out: http://wiki.netbeans.org/RubyInstallation Rick On Nov 24, 2:01 pm, Ryan Bigg (Radar) [EMAIL PROTECTED] wrote: Garrett, have a read ofhttp://guides.rails.info/getting_started_with_rails.html. That should help you a lot

[Rails] Re: Problem viewing my hello world app

2008-11-26 Thread Rick
the page. Rick On Nov 26, 11:23 am, Mrmaster Mrmaster [EMAIL PROTECTED] s.net wrote: Hi, I've created a hello world app that i want to view but i get CGI::Session::CookieStore::TamperedWithCookie error in the browser when i run it. I copied everything in my browswer below and I've also

[Rails] Re: Date_select vs wrong date weird behavior

2008-11-26 Thread Rick
Remi, Sorry it's taken me so long to get back to you, I lost the thread... I think what you're looking for is the callback from ActiveRecord::Callbacks -- before_save Rick On Nov 1, 4:31 am, Rémi Gagnon [EMAIL PROTECTED] wrote: Let me clarify. The date_select help generates 3 combobox

[Rails] Re: Constructing current_user.recipes for administrators?

2008-11-26 Thread Rick
You might think of an index all that is accessible only to admin. before_filter :check_admin_role, :only = [:index] Rick On Nov 25, 11:14 pm, Bob Sanders [EMAIL PROTECTED] wrote: I'm using the restful_authentication's current_user. So to find a user's recipes, I use: current_user.recipes

[Rails] Re: report

2008-11-26 Thread Rick
Hello Subhadip, fastercsv is another gem: http://fastercsv.rubyforge.org/ Rick On Nov 26, 1:23 am, Subhadip Chakraborty [EMAIL PROTECTED] s.net wrote:  Hi, i am currently working on how we generate report in ruby on rails.  i follow 'Ruport' for generating report in ruby on rails,but when i

[Rails] Re: Problem populating a model with external data

2008-11-27 Thread Rick
. Rick On Nov 26, 4:05 pm, RichardOnRails [EMAIL PROTECTED] wrote: A couple of blemishes on my post.  Obviously: The pastie hyperlink should behttp://www.pastie.org/325017 The other hyperlink doesn't make any sense.  It's content is the third item on the pastie page. I apologize for seeing how

[Rails] Re: git .gitignore vs exclude file

2008-11-27 Thread Rick
Hey TeeDub, Start here: http://www.kernel.org/pub/software/scm/git/docs/ google is your friend too Rick On Nov 27, 5:11 am, Ruby Freak [EMAIL PROTECTED] wrote: I am a bit confused about the different purpose of each. I think the .gitignore file belongs in the root of my project

[Rails] Re: Strategy for dealing with large db tables

2008-11-27 Thread Rick
to get ~1 million row queries to run in about 5 min. Rick On Nov 27, 5:15 am, Arfon Smith [EMAIL PROTECTED] wrote: I'm looking at building a Rails application which will have some pretty large tables with upwards of 500 million rows.  To keep things snappy I'm currently looking into how

[Rails] Re: Two root URLs

2008-11-28 Thread Rick
| format.html # welcome.html.erb format.xml { render :xml = @page } end end views/pages/welcome.html.erb p bTitle:/b %=h @page.title % /p % if logged_in? % %= render :partial = 'layouts/welcome_back' % % else % %= render :partial = 'layouts/please_login' % % end % Rick Rick

[Rails] Re: 126: The specified module could not be found - ../mysql.

2008-11-28 Thread Rick
seconds. 113 tests, 379 assertions, 0 failures, 0 errors So there you go... Rick On Nov 28, 10:07 am, Tarscher [EMAIL PROTECTED] wrote: putting the mysql bin in the path solved my problem. Many thank Stijn On 28 nov, 20:30, Matthew Phillips [EMAIL PROTECTED] wrote: Matthew Phillips

[Rails] Re: mysql 2.7.3 gem install for Windows appears incomplete

2008-11-28 Thread Rick
: ruby ./test.rb -- localhost test test testDB will run an array of tests on your mysql ruby access. They should ALL pass. Rick On Nov 26, 10:05 pm, Wes Gamble [EMAIL PROTECTED] wrote: Rick wrote: Hi Wes, Did you see anything in the ext directory? Rick On Nov 25, 10:30 am, Wes Gamble

[Rails] Re: mysql 2.7.3 gem install for Windows appears incomplete

2008-11-28 Thread Rick
.require_paths is officially disparaged :-P On Nov 26, 10:05 pm, Wes Gamble [EMAIL PROTECTED] wrote: Rick wrote: Hi Wes, Did you see anything in the ext directory? Rick On Nov 25, 10:30 am, Wes Gamble [EMAIL PROTECTED] Yes.  I see the following files: extconf.rb mysql.c.in

[Rails] Re: valid? is not working in Rails 2.2.2

2008-12-01 Thread Rick
Hey back at you, Ruby version1.8.7 (powerpc-darwin9) RubyGems version1.3.1 Rails version 2.2.2 Active Record version 2.2.2 Action Pack version 2.2.2 Active Resource version 2.2.2 Action Mailer version 2.2.2 Active Support version 2.2.2 Application root/Users/rick

[Rails] Re: mysql 2.7.3 gem install for Windows appears incomplete

2008-12-02 Thread Rick
install mysql --verbose This should give you the full compilation sequence - very useful stuff if you're interested in knowing how it's compiled. Rick On Nov 29, 9:53 am, Matthew Phillips [EMAIL PROTECTED] s.net wrote: Rick wrote: Can you determine what dates are associated with the files

[Rails] Re: mysql 2.7.3 gem install for Windows appears incomplete

2008-12-02 Thread Rick
to be sure, uninstall the gem and reinstall with the --verbose flag. gem uninstall mysql --version=2.8 gem install mysql --verbose This should give you the full compilation sequence - very useful stuff if you're interested in knowing how it's compiled. Rick On Dec 2, 11:58 am, Wes Gamble [EMAIL

[Rails] Re: MySQL Adapter on Rails 2.2

2008-12-02 Thread Rick
versions from 2.7.0 through 2.8 on Mac OS X under Ruby 1.8.7p72, Rails 2.2.2, Gem 1.3.1. I don't have access to a Windows system of any kind however so I don't know how portable my change is. Rick On Dec 2, 12:37 pm, Joshua Partogi [EMAIL PROTECTED] wrote: I was talking about the mysql ruby

[Rails] Re: mysql 2.7.3 gem install for Windows appears incomplete

2008-12-02 Thread Rick
it and do you want to give compiling your gem a shot? Rick On Dec 2, 2:56 pm, Wes Gamble [EMAIL PROTECTED] wrote: Rick wrote: I'm under the assumption that the mysql gem for Windows is precompiled, like all of the other gems for Windows (generally speaking), so there isn't really a compilation

[Rails] Re: mysql 2.7.3 gem install for Windows appears incomplete

2008-12-02 Thread Rick
Right, I gave up on what ships with Mac and just built everything fresh in /opt/local. That's a good place to put your precious stuff BTW because a reinstall or major upgrade of OSX will trash /usr/local. later Rick On Dec 2, 8:05 pm, Wes Gamble [EMAIL PROTECTED] wrote: My main OS is Mac OS X

[Rails] Re: MySQL Adapter on Rails 2.2

2008-12-03 Thread Rick
Fred, I'll give 1.8.6 a try and let you know what happens, 1.8.6p114 is what ships on the Mac. Rick On Dec 2, 11:24 pm, Frederick Cheung [EMAIL PROTECTED] wrote: On Dec 3, 2:20 am, Rick [EMAIL PROTECTED] wrote: Hey Joshua and Fred, I agree with the general statement that installing

[Rails] Re: MySQL Adapter on Rails 2.2

2008-12-03 Thread Rick
So what little genie whispered that magic into your ear? Thanks for passing it on though. I don't want to say how long I spent puzzling through the mkmf / extconf code trying to figure how to pass that sucker in. Is this a general RoR convention or what? Rick On Dec 3, 12:25 am, Frederick

[Rails] Re: Rails (and MySQL) on Linux - gem install mysql

2008-12-03 Thread Rick
On unix systems you can typically do which mysql_config and you'll find that the libraries are $(which mysql_config)/../lib. Then you can use Fred's tip and: gem install mysql -- --with-mysql-config=$(which mysql_config) Rick On Dec 3, 8:15 am, Jo Potts [EMAIL PROTECTED] wrote: Instructions

[Rails] Re: How to setup a default route?

2008-12-03 Thread Rick
Hey Richard, try map.index '/', :controller = 'csvs', :action = 'index' Rick On Dec 3, 9:04 pm, RichardOnRails [EMAIL PROTECTED] wrote: I’ve got a new Rails 2.0.2 application for which  I created CRUD functionality with: ruby script/generate scaffold Csv [with a few fields and their types

[Rails] Re: exceptions_logger

2008-12-09 Thread Rick
://github.com/defunkt/exception_logger/tree/master Rick On Dec 8, 9:26 am, Petan Cert [EMAIL PROTECTED] wrote: Hi, I am trying to use exception logger plugin, but I am getting this error: undefined method `paginate' for #LoggedExceptionsController: and I cant figure out why. I have generated

[Rails] newbie stumped - when form validates, normally return is fine, but when I select a certain checkbox, I end up with a new object created on return

2008-12-09 Thread Rick
start to look? I have some log statements and the same flow seems to happen regardless of the scenario. I posted the main controller and a few other things that I think might be relevant here http://pastie.org/335194 in case anyway wants to help by taking a look. -- Rick

[Rails] Re: newbie stumped - when form validates, normally return is fine, but when I select a certain check

2008-12-09 Thread Rick
On Tue, Dec 9, 2008 at 3:22 PM, Shandy Nantz [EMAIL PROTECTED] wrote: What is your log saying? The log doesn't show much that seems to help me. Here is the log http://pastie.org/335259 after the create button is hit and the form submits. Notice at the end you'll see 3 calls to something like:

[Rails] Re: newbie stumped - when form validates, normally return is fine, but when I select a certain check

2008-12-09 Thread Rick
On Tue, Dec 9, 2008 at 4:24 PM, Frederick Cheung [EMAIL PROTECTED] wrote: On Dec 9, 9:00 pm, Rick [EMAIL PROTECTED] wrote: On Tue, Dec 9, 2008 at 3:22 PM, Shandy Nantz Can someone give me some tips as to what even might be wrong or where I should start to look? I have some log statements

[Rails] Re: newbie stumped - when form validates, normally return is fine, but when I select a certain check

2008-12-10 Thread Rick
On Tue, Dec 9, 2008 at 4:24 PM, Frederick Cheung [EMAIL PROTECTED] wrote: Is this rails check box trickery tripping you up ? The rails check box helper creates a hidden input field with the same name (and value 0) as well as the actual check box. If you're using arrays of parameters like I

[Rails] [SOLVED thanks Frederick] was Re: newbie stumped - when form validates, normally return is fine, but when I select a certain check

2008-12-10 Thread Rick
, 2008 at 11:27 AM, Frederick Cheung [EMAIL PROTECTED] wrote: On 10 Dec 2008, at 15:55, Rick wrote: On Tue, Dec 9, 2008 at 4:24 PM, Frederick Cheung [EMAIL PROTECTED] wrote: Is this rails check box trickery tripping you up ? The rails check box helper creates a hidden input field

[Rails] Re: How to setup a default route?

2008-12-16 Thread Rick
of your Document model. But, to your specific question: grep documents config/routes.rb == map.resources :documents When in doubt, rake it out... rake routes (in /Users/rick/test) documents GET/documents {:controller=documents, :action=index} formatted_documents GET

[Rails] Re: http://localhost/3000 cant see my pages

2008-12-16 Thread Rick
Graham, One more time: localhost:3000 NOT localhost/3000 Rick On Dec 16, 11:55 am, Graham Okeeffe rails-mailing-l...@andreas-s.net wrote: I think I'm going to cry. I have been trying to get this to work for the last 6 hours and cant get anywhere. My installation was working fine

[Rails] Re: mySQL setup - I'm losing it here.

2008-12-19 Thread Rick
the mysql -uroot... command. Once you have success with this, you should modify your shell startup file to make the PATH change permanent. Depending on what shell you use this could be .profile, .cshrc, .tshrc, ... Rick I get the error on the second line --- any advise? I assume this has

  1   2   3   4   5   6   7   8   >