[Rails] Re: STI problem

2008-10-02 Thread Daniel
On Oct 3, 3:15 pm, cool <[EMAIL PROTECTED]> wrote: > u didnt tell me how can we add in the create action at the same time > for people table >   can u send me the code how can we add or an idea of that? > For the controller and the html form, nothing is stopping you from editing and creating mult

[Rails] form_remote_tag and :with

2008-10-02 Thread David
I am trying to pass the result from a javascript function along with the result from a text_field with form_remote_tag. This is what I have so far, but no go: <% form_remote_tag(:url => {:controller => 'requests', :action => 'create'}, :with => "'data='+request()", :update => 'request_sent'

[Rails] Re: undefined method `merge' for "/":String

2008-10-02 Thread infinteVerve
Nevermind, Just fixed it. I will post the solution tomorrow, for anyone else tackling similar issues. On Oct 2, 11:34 pm, infinteVerve <[EMAIL PROTECTED]> wrote: > issue #1. I'm a newb. > > So, I'm trying to set up a calendar of lessons using the > WeekViewHelper snippet found > here:http://snip

[Rails] Gruff bar charts and zero data

2008-10-02 Thread David Allen
Hi - I am creating bar and stacked bar charts in Gruff, but the problem I am having is that zero data is showing up as a thin bar. (It also seems to be that way in examples I have seen online where a zero value still shows as a thin bar or slice) It's not a major issue to see a thin sliver on a p

[Rails] Re: Autocomplete (plugin&Scriptaculous) not working in Safari.

2008-10-02 Thread Vinay
@Xavier I used a solution i had for auto_complete for the results. But there are a few issues like the options list does not go away when the user selects an option. I either need to press "esc" or click on some other part of the page for that to go away. And i cant use the mouse to select an opti

[Rails] Re: Removing Non Alpha & Numeric Characters From String

2008-10-02 Thread Ben Knight
Roy Pardee wrote: > This is arguably a tad bit prettier: > > title.downcase.gsub(/[^a-z ]/, '').gsub(/ /, '-') > > Not sure if it's that much better... That works great (and looks prettier :-)! Thanks. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~-

[Rails] Re: STI problem

2008-10-02 Thread cool
u didnt tell me how can we add in the create action at the same time for people table can u send me the code how can we add or an idea of that? On Oct 3, 3:47 am, Daniel <[EMAIL PROTECTED]> wrote: > On Oct 3, 8:22 am, Daniel <[EMAIL PROTECTED]> wrote: > > > Hi Cool, > > This post didn't make it

[Rails] Re: New to Rails.

2008-10-02 Thread Bobnation
Have fun, read lots, and ask questions. SQLite3 is a wonderful way to get started with things. On Oct 2, 3:16 pm, "Zack K." <[EMAIL PROTECTED]> wrote: > I just downloaded the new version of rails which has SQLite with it, > any tips on getting things set up? > > On Oct 2, 1:44 pm, blasterpal <[EM

[Rails] undefined method `merge' for "/":String

2008-10-02 Thread infinteVerve
issue #1. I'm a newb. So, I'm trying to set up a calendar of lessons using the WeekViewHelper snippet found here: http://snippets.dzone.com/posts/show/5206 (very slightly altered). The problem only occurs when I try to set the :url option. Without it works fine, except I haven't been able to (ca

[Rails] Re: Dealing with accented characters

2008-10-02 Thread Petite Abeille
On Oct 2, 2008, at 2:25 AM, Morgan Kay wrote: > >> One approach is to transliterate your input, e.g.: >> >> http://interglacial.com/~sburke/tpj/as_html/tpj22.html >> -- Sean M. Burke, Unidecode!, 2001 >> >> That way, "Chrétien" becomes "chretien" or some such for the purpose >> of your search, b

[Rails] Re: Create a menu out from database entries

2008-10-02 Thread Bill Walton
Hi, glennswest wrote> > > Actually got a good bit of code for this done. > > 1. Scan a available controllers, and add table entries for any "new" > ones automatically > 2. If updates, generate new tabnav menus automatically at startup. Sounds like a good candidate for a plugin! Let us know if

[Rails] has_many association. Is this possible??

2008-10-02 Thread TheZ
I have the following schema. table: user t.column :id, :integer table: friends t.column :user_id, :integer #Owner of this friendship t.column :friend_id, :integer #FK to User table table: activity t.column :user_id Basically I want to display all activity from friends that i have

[Rails] Easier way to pull associated records of has_many associated

2008-10-02 Thread Ko None
Currently my User model has has_many groups and the Group model has_many folders. so is there any way to pulling all the folders like this. user.groups.folders? Currently I have to loop like this and dump them in to array. [code=] def user_folders user_folders = [] user_folders.push(se

[Rails] Re: convert html to plain text in ruby

2008-10-02 Thread Walter McGinnis
You might be able to check out some example code in convert_attachment_to plugin: http://github.com/kete/convert_attachment_to/tree/master Depending on configuration, it will take an uploaded HTML file (or PDF, MS doc...) and convert it into a plain text attribute, etc. Probably overkill for what

[Rails] Re: Problem getting Rails to emit the correct (proxy) domain

2008-10-02 Thread shuber
My assets seem to be resolving correctly. Looks like you're using attachment_fu. Are you using something like image_tag(@image.public_filename) ? Thanks, Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on

[Rails] Re: param with map.resources

2008-10-02 Thread Ian Smith-Heisters
Wouldn't that give me "/papas/1/sons/new"? Not exactly what I'm looking for if I understand it correctly, but thanks. On Thu, Oct 2, 2008 at 9:18 AM, Dave S <[EMAIL PROTECTED]> wrote: > > It sounds like you want to be using nested resources. Try something > like this > > map.resources :papas, :ha

[Rails] fragment caching with search box

2008-10-02 Thread Scott Kulik
I'm trying to setup some fragment caching which works fine for the index but i'm not sure how to ignore the caching if they are searching the index results. my code in short: ItemsController def index @items = Item.search(params[:search], params[:min_rank], params[:max_rank], params[:clas

[Rails] Re: Grouping data for charting

2008-10-02 Thread Pardee, Roy
How about supplementing what you're already getting back w/a call like this: @entries << Entry.find_by_sql('select sum(entries.price) as sum_price, "uncategorized" as category_name from entries where id not in (select entry_id from entry_categories)') HTH, -Roy -Original Message- Fro

[Rails] Re: Manual Ordering in Models

2008-10-02 Thread Sean Clark Hess
Any hint on what those SQL statements might be? Something like UPDATE * WHERE position > N ... then... I'm not so good at procedural SQL. Maybe you were saying you'd get all the records higher than N, then loop through and increment the position? On Thu, Oct 2, 2008 at 4:35 PM, DyingToLearn <[EMAI

[Rails] Re: STI problem

2008-10-02 Thread Daniel
On Oct 3, 8:22 am, Daniel <[EMAIL PROTECTED]> wrote: > Hi Cool, > This post didn't make it onto ruby-forum.com but it is on google. > > On Oct 2, 11:10 pm, cool <[EMAIL PROTECTED]> wrote: > > > this is my model > >    class Person < ActiveRecord::Base > >   end > > class parent < Person > > end

[Rails] Re: Manual Ordering in Models

2008-10-02 Thread DyingToLearn
Sean Clark Hess wrote: > I've thought of including a field called "order" or something, but then I'd > have to update every single one when I change the order. You can update them all with just 2-3 SQL statements, so it doesn't have be to a performance concern. I've done this several times. Side

[Rails] Re: STI problem

2008-10-02 Thread Daniel
Hi Cool, This post didn't make it onto ruby-forum.com but it is on google. On Oct 2, 11:10 pm, cool <[EMAIL PROTECTED]> wrote: > this is my model >    class Person < ActiveRecord::Base >   end > class parent < Person > end > class Student < person > end > class principal end Obviously the above

[Rails] Re: Grouping data for charting

2008-10-02 Thread Pardee, Roy
Ah, right. Well, that SQL will only ever return a single row, so you should be able to reference the single element contained therein, like so: @entries << Entry.find_by_sql('select sum(entries.price) as sum_price, "uncategorized" as category_name from entries where id not in (select entry_id

[Rails] Re: alternative to "script/plugin install -x" that works with git

2008-10-02 Thread Miles Georgi
Hi Scott, I have a lot of problems with git-submodule, and git-submodule was the main reason I wrote externals. I explain some of the things I don't like about git-submodule at: http://nopugs.com/why-ext Also, if the main project is managed by subversion, then you can't use git-submodule to man

[Rails] Warning messages on gem:unpack after updating to rubygems 1.3

2008-10-02 Thread Mike Breen
After updating to rubygems 1.3 I started getting these warnings when running "rake gems:update" : WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and /usr/bin aren't both writable. WARNING: You don't have /Users/myhome/.gem/ruby/1.8/bin in your PATH, gem executabl

[Rails] Re: AJAX not Working in Production

2008-10-02 Thread Frederick Cheung
On 2 Oct 2008, at 22:27, Abel wrote: > > That's weird because if you debug it with Firebug you can see how > effects.js is loaded. > But if you go to http://www.jbcmanagement.com/javascripts/prototype.js then you get an error page instead of the javascript. Your ajax ain't going to work with

[Rails] Re: AJAX not Working in Production

2008-10-02 Thread Abel
That's weird because if you debug it with Firebug you can see how effects.js is loaded. On Oct 2, 10:56 pm, Frederick Cheung <[EMAIL PROTECTED]> wrote: > Sounds like apache or nginx or whatever your frontend is isn't serving   > your javascript files correctly > > Fred > > Sent from my iPhone > >

[Rails] _changed? oddity

2008-10-02 Thread rubynuby
I have an activerecord with an attribute copyr_id (integer). In a callback event copyr_id_changed? is always true but if I test copyr_id_was != copyr_id then it correctly detects when copyr_id actually changed. I have other integer attributes I tested in the same callback with _changed? and

[Rails] Re: acts_as_commentable: find Post by date of comment

2008-10-02 Thread morgancurrie
Here's how I did it last night after about an hour of googling the shit out of it and coming up empty. # First I load all the messages @messages = Message.all # Then I loop through them all, and if a message has a comment, # I change the message's created_at field to the comments created_at @mes

[Rails] Re: alternative to "script/plugin install -x" that works with git

2008-10-02 Thread scott
how about git submodule? git submodule add git://github.com/rails/acts_as_list.git vendor/ plugins/acts_as_list git submodule init git submodule update On Oct 2, 4:57 pm, "Miles Georgi" <[EMAIL PROTECTED]> wrote: > I miss the svn:externals feature when installing plugins that are > managed under

[Rails] 'new' sql injection attack

2008-10-02 Thread Jodi Showers
I've found references to the following attack in our logs this week: http://www.lexa.ru/security-alerts/msg01435.html At the time of the above posts writing, it was targeted at IIS and mysql - but the general scheme looks to be portable to other configs. Generally it passes a hex string, to be

[Rails] Re: New to Rails.

2008-10-02 Thread blasterpal
The prefpane is broken in 10.5 last I check. For now just search for "mysql_safe" and google how to start from command line. The real issue here is OSX is not like Linux AT ALL in how it starts daemons. And some of the reading you might find on Linux simply won't apply. My real recommendation to

[Rails] Re: AJAX not Working in Production

2008-10-02 Thread Frederick Cheung
Sounds like apache or nginx or whatever your frontend is isn't serving your javascript files correctly Fred Sent from my iPhone On 2 Oct 2008, at 21:52, John Cook <[EMAIL PROTECTED]> wrote: > > I'm having an issue in my Prod environment where some sets of Ajax > code > are not working co

[Rails] Re: 'new' sql injection attack

2008-10-02 Thread Frederick Cheung
While the payload may be slightly novel and quite crafty it looks like just good old fashioned SQL injection Fred Sent from my iPhone On 2 Oct 2008, at 21:36, Jodi Showers <[EMAIL PROTECTED]> wrote: > I've found references to the following attack in our logs this week: > > http://www.lexa.ru/

[Rails] AJAX not Working in Production

2008-10-02 Thread John Cook
I'm having an issue in my Prod environment where some sets of Ajax code are not working correctly Going to http://www.jbcmanagement.com/test_case/new# and clicking Add a Step executes the following code: <%= link_to_function "Add a Step" do |page| page.insert_html :bottom, :chaka, :partial => 't

[Rails] Re: Many to Many Relationship with One Model

2008-10-02 Thread ratibus
I agree, I was trying to figure out how to do exactly the same thing! Great explanation. On Aug 28, 11:23 pm, "Craig Demyanovich" <[EMAIL PROTECTED]> wrote: > I'll start w/ the User class. > > class User < ActiveRecord::Base >   has_and_belongs_to_many :friends, >     :class_name => "User", # [1]

[Rails] Re: Grouping data for charting

2008-10-02 Thread ressister
It's a bit ugly, but here's what i did: @entries = Entry.find_by_sql ["SELECT sum(entries.price) AS sum_price, categories.name AS category_name, categories.color AS category_color FROM entries, categories, entry_categories WHERE entries.user_id = ? AND entries.id = entry_categories.en

[Rails] Re: Problem getting Rails to emit the correct (proxy) domain

2008-10-02 Thread Sven Aas
Yes, I am using attachment_fu, and I am using image_tag(image.public_filename). I have images working right now, but only by dropping the creation of the X_FORWARDED_URI request header. So obviously other stuff isn't working ... -Sven --~--~-~--~~~---~--~~ You rece

[Rails] Re: Grouping data for charting

2008-10-02 Thread ressister
Great suggestion Roy, thanks! I even added category_color for uncategorized entries in the SQL query you built. Take a look at the output though... [#, #, #, #, [#]] The 5th entry here is the "uncategorized" entry. It's in brackets which is tripping up Open Flash Chart. How do i remove that

[Rails] Re: Removing Non Alpha & Numeric Characters From String

2008-10-02 Thread Petite Abeille
On Oct 2, 2008, at 10:12 PM, Hassan Schroeder wrote: > Firefox 2 turns this into: http://localhost/sample/Chr%C3%A9tien.txt > while Safari requests http://localhost/sample/Chrétien.txt Even though Safari does indeed display the accentuated characters in its UI, it does encode the URL properl

[Rails] Re: New to Rails.

2008-10-02 Thread Zack K.
I just downloaded the new version of rails which has SQLite with it, any tips on getting things set up? On Oct 2, 1:44 pm, blasterpal <[EMAIL PROTECTED]> wrote: > The prefpane is broken in 10.5 last I check. For now just search for > "mysql_safe" and google how to start from command line. The rea

[Rails] Re: Removing Non Alpha & Numeric Characters From String

2008-10-02 Thread Hassan Schroeder
On Thu, Oct 2, 2008 at 12:52 PM, Petite Abeille <[EMAIL PROTECTED]> wrote: >> It depends on the Web server being able to handle it, but yes, you >> can have non-ISO-8859-1 characters in a URL. > > Hmmm... are you sure? I thought one would need to encode anything but > a small subset of US-ASCII:

[Rails] Re: wrong respond_to format used

2008-10-02 Thread Frederick Cheung
On 2 Oct 2008, at 16:08, Tarscher wrote: > > Hi all, > > I have a form that wrongly trigger the rjs respond to with ie7. The > html repond_to is correctly used in both FF 3 and Google Chrome. I use > the standard form_for helper and have no idea what could cause this > issue. Take a look at wha

[Rails] Re: Removing Non Alpha & Numeric Characters From String

2008-10-02 Thread Petite Abeille
On Oct 2, 2008, at 9:33 PM, Hassan Schroeder wrote: > It depends on the Web server being able to handle it, but yes, you > can have non-ISO-8859-1 characters in a URL. Hmmm... are you sure? I thought one would need to encode anything but a small subset of US-ASCII: "The generic URI syntax ma

[Rails] Re: Removing Non Alpha & Numeric Characters From String

2008-10-02 Thread David A. Black
Hi -- On Thu, 2 Oct 2008, Ben Knight wrote: > > Hello. > > We have book titles as a column in our database, which I would like to > use in our URLS for SEO purposes. Given that these are titles, they > include characters other than alphabets and numbers (e.g. punctuation, > blanks, foreign char

[Rails] Re: Removing Non Alpha & Numeric Characters From String

2008-10-02 Thread Hassan Schroeder
On Thu, Oct 2, 2008 at 11:52 AM, Pardee, Roy <[EMAIL PROTECTED]> wrote: > > If you don't, you'll likely have to url-encode the result (I don't think > e.g., accented characters are usable in URLs, are they? It depends on the Web server being able to handle it, but yes, you can have non-ISO-8859-

[Rails] Grouping data for charting

2008-10-02 Thread ressister
Hi there, I'm using Open Flash Chart to create a pie chart of user's categorized spending. It currently includes only categories that I have in my Category model, but does not include "uncategorized" entries which have no association in the entry_categories table. I'd like to include those entri

[Rails] Re: Removing Non Alpha & Numeric Characters From String

2008-10-02 Thread Pardee, Roy
Well, Hassan makes a good point that this will eat any non-ascii characters. Consider whether you want to do that. If you don't, you'll likely have to url-encode the result (I don't think e.g., accented characters are usable in URLs, are they? -Original Message- From: rubyonrails-tal

[Rails] Re: Removing Non Alpha & Numeric Characters From String

2008-10-02 Thread Pardee, Roy
This is arguably a tad bit prettier: title.downcase.gsub(/[^a-z ]/, '').gsub(/ /, '-') Not sure if it's that much better... -Original Message- From: rubyonrails-talk@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ben Knight Sent: Thursday, October 02, 2008 10:52 AM To: rubyo

[Rails] Re: param with map.resources

2008-10-02 Thread Ian Smith-Heisters
Sigh, yeah, there's always that way. So unrailsy... but probably what I'll end up doing. Or I could patch Resources to make it push any unclaimed options into params. But parsing the URI by hand is probably easier. On Wed, Oct 1, 2008 at 8:35 PM, Greg DeVore <[EMAIL PROTECTED]> wrote: > > Ian- >

[Rails] Removing Non Alpha & Numeric Characters From String

2008-10-02 Thread Ben Knight
Hello. We have book titles as a column in our database, which I would like to use in our URLS for SEO purposes. Given that these are titles, they include characters other than alphabets and numbers (e.g. punctuation, blanks, foreign characters in some cases). What's the easiest way to do this?

[Rails] Re: Removing Non Alpha & Numeric Characters From String

2008-10-02 Thread Hassan Schroeder
On Thu, Oct 2, 2008 at 11:00 AM, Pardee, Roy <[EMAIL PROTECTED]> wrote: > > This is arguably a tad bit prettier: > > title.downcase.gsub(/[^a-z ]/, '').gsub(/ /, '-') ..but doesn't do the same thing as the OP's -- this one will strip out non-vanilla-ASCII accented characters, which could well be

[Rails] Re: convert html to plain text in ruby

2008-10-02 Thread Richard Luther
You could use some regexp and the hash ERB::Util::HTML_ESCAPE to return the unescaped versions of the characters. - Richard On Oct 1, 3:31 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm looking for a way to convert html to plain text. > Now, I know about strip_tags, but - as th

[Rails] Re: klass is the Class of the model from a controller context?

2008-10-02 Thread Brett Nelson
Thanks Fred! That makes sense. Brett --~--~-~--~~~---~--~~ 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 grou

[Rails] Re: Problem getting Rails to emit the correct (proxy) domain

2008-10-02 Thread shuber
I found this page http://httpd.apache.org/docs/2.2/env.html which states "Conditional Per-Request Settings For additional flexibility, the directives provided by mod_setenvif allow environment variables to be set on a per-request basis, conditional on characteristics of particular requests. For

[Rails] Re: multiple belong_to associations & build

2008-10-02 Thread Frederick Cheung
On 2 Oct 2008, at 18:50, Jonas Schneider wrote: > > Hey guys, > > I have a Comment model which belongs_to a Post and a User model. > Now I want to be able to build a comment for this User and this Post. > Does it really have to go like this: > > @comment = @idea.comments.build > @comment.user =

[Rails] Re: Dealing with accented characters

2008-10-02 Thread Jens Wille
Petite Abeille [2008-10-02 19:56]: > At its core, Unidecode is simply a lookup table. Should be rather > straightforward to port to Ruby if it hasn't been done already. i wanted to do it, but it's been there for over a year now: cheers jens --~--~--

[Rails] multiple belong_to associations & build

2008-10-02 Thread Jonas Schneider
Hey guys, I have a Comment model which belongs_to a Post and a User model. Now I want to be able to build a comment for this User and this Post. Does it really have to go like this: @comment = @idea.comments.build @comment.user = current_user Is there a better way to do this? Thanks, Jonas --~

[Rails] Re: New to Rails.

2008-10-02 Thread dudeman
Rails 2.1 uses SQLite by default. you may want to go with that. Its pretty slick. Karmen http://blog.dudeblake.com On Oct 2, 9:55 am, "Zack K." <[EMAIL PROTECTED]> wrote: > I installed the .prefpane for System Preferences and it and always > crashes when i try to start the server the prefpan

[Rails] Re: link to remote + update

2008-10-02 Thread Frederick Cheung
On 2 Oct 2008, at 15:21, da991319 wrote: > > Hi, > > i need to post a form using AJAX so that I can update and save my > object: > > form: > <% form_for(@sample,:html => {:id => "analyses_list"}) do %> > Analyses: > ><%= render :partial => 'parameters/parameter_name', > :colle

[Rails] Bad MIME type in IE7 Validator w3.org

2008-10-02 Thread Jorg Lueke
For my main rails webpage I get an error that the content type is text/ javascript which comes as a validation error and prevents IE7 from functioning. Firefox and Safari seem to be able to get around this. If I just validate the HTML by itself it is OK. Is there something in mongrel that needs

[Rails] squirrel and acts_as_rails

2008-10-02 Thread Ant
I have been using Squirrel (http://thoughtbot.com/projects/squirrel) for performing rails searches. It really takes the thinking out of sql conditions and makes it so much more like normal ruby syntax. I have recently been using the acts_as_tree gem(http://github.com/ jcnetdev/acts_as_tree/tree/

[Rails] Re: New to Rails.

2008-10-02 Thread Zack K.
I installed the .prefpane for System Preferences and it and always crashes when i try to start the server the prefpane crashes, any ideas? On Oct 2, 12:47 pm, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On 2 Oct 2008, at 17:27, blasterpal wrote: > > > > > 10.5 changed some things. I've used thi

[Rails] Re: New to Rails.

2008-10-02 Thread Frederick Cheung
On 2 Oct 2008, at 17:27, blasterpal wrote: > > 10.5 changed some things. I've used this a couple of times already to > do from source (which is the most flexible and best for understanding > and learning): > > http://hivelogic.com/articles/2007/11/installing-mysql-on-mac-os-x > As far as mysql g

[Rails] Re: New to Rails.

2008-10-02 Thread blasterpal
10.5 changed some things. I've used this a couple of times already to do from source (which is the most flexible and best for understanding and learning): http://hivelogic.com/articles/2007/11/installing-mysql-on-mac-os-x H On Oct 2, 10:14 am, "Zack K." <[EMAIL PROTECTED]> wrote: > I have lo

[Rails] Re: New to Rails.

2008-10-02 Thread Bobnation
I'm curious as to the choice for Locomotive and not using Rails just within Mac OS X itself. On Oct 2, 9:14 am, "Zack K." <[EMAIL PROTECTED]> wrote: > I have locomotive on OS X 10.5 and i can't get mySQL to install right. > That's my main problem. > > On Oct 2, 9:11 am, Shandy Nantz <[EMAIL PROTE

[Rails] Re: Simple testing question: Handling login in functional te

2008-10-02 Thread Wes Gamble
I also found this approach which is interesting because it actually forces a test of the login process each time. http://alexbrie.net/1526/functional-tests-with-login-in-rails/ Thanks for the responses. Wes -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~-

[Rails] Re: param with map.resources

2008-10-02 Thread Dave S
It sounds like you want to be using nested resources. Try something like this map.resources :papas, :has_many => [:sons, :daughters] For more info read... http://api.rubyonrails.org/classes/ActionController/Resources.html On Oct 1, 10:35 pm, Greg DeVore <[EMAIL PROTECTED]> wrote: > Ian- > I do

[Rails] Re: Rails looking for development db in production

2008-10-02 Thread blasterpal
I've seen an issue before where non-root mysql accounts just don't work. Even with full GRANT on the database in question. I can't explain it. But for troubleshooting, try your root account in your production database.yml and retry. Secondly, in the same manner, database migrations sometimes give

[Rails] Re: Ajax call once on page load

2008-10-02 Thread Frederick Cheung
On Oct 2, 4:39 pm, Tim Conner <[EMAIL PROTECTED]> wrote: > I want to run an Ajax call but I don't want to do it through a link > (link_to_remote), through a form (form_remote_tag) or periodically > (periodically_call_remote).  I just want to make the call once and I > want to happen automaticall

[Rails] Re: problem with auto_complete!!

2008-10-02 Thread Dave S
Download Firebug, it'll give you a much better idea of what's going on http://getfirebug.com/ On Oct 1, 6:04 pm, Juan Moreno <[EMAIL PROTECTED]> wrote: > gdevore wrote: > > Is your Alumno controller setup as a RESTful resource?  If so, then > > the auto complete call won't work because the auto_

[Rails] Re: migration how to?

2008-10-02 Thread Frederick Cheung
On Oct 2, 4:14 pm, Iain Adams <[EMAIL PROTECTED]> wrote: > Does anyone know how to do this? I had one idea. Save all the current > records in array, delete old table recreate new table reinsert all > data. Is there an easier way!! Judicious use of add_column and rename_table Fred > > Thanks >

[Rails] Ajax call once on page load

2008-10-02 Thread Tim Conner
I want to run an Ajax call but I don't want to do it through a link (link_to_remote), through a form (form_remote_tag) or periodically (periodically_call_remote). I just want to make the call once and I want to happen automatically after the page has finished loading. I'd like to write this usin

[Rails] Re: Simple testing question: Handling login in functional te

2008-10-02 Thread Joshua Abbott
Just saw this at Neeraj's site this morning: http://www.neeraj.name/blog/articles/739-testing-tip-use-method-login_as -- Josh http://www.iammrjoshua.com Robby Russell wrote: > Generally, you'll need to mock out your login checks in your > setup/before. > > On Thu, Oct 2, 2008 at 8:18 AM, Wes

[Rails] Re: Simple testing question: Handling login in functional te

2008-10-02 Thread Joshua Abbott
Just saw at Neeraj's site this morning: http://www.neeraj.name/blog/articles/739-testing-tip-use-method-login_as -- Josh http://www.iammrjoshua.com Robby Russell wrote: > Generally, you'll need to mock out your login checks in your > setup/before. > > On Thu, Oct 2, 2008 at 8:18 AM, Wes Gambl

[Rails] Re: New to Rails.

2008-10-02 Thread Robby Russell
Zack, You might give PostgreSQL a shot. Here is a walk-through that I wrote on setting up OSX like we do at Planet Argon. * http://rubyurl.com/cKyM Good luck! Robby On Thu, Oct 2, 2008 at 7:14 AM, Zack K. <[EMAIL PROTECTED]> wrote: > > I have locomotive on OS X 10.5 and i can't get mySQL to

[Rails] Re: Simple testing question: Handling login in functional tests

2008-10-02 Thread Robby Russell
Generally, you'll need to mock out your login checks in your setup/before. On Thu, Oct 2, 2008 at 8:18 AM, Wes Gamble <[EMAIL PROTECTED]> wrote: > > When writing functional (e.g. controller unit) tests, I'm running into a > simple problem that I'm sure is very easy to fix, but I'm not sure of > t

[Rails] Simple testing question: Handling login in functional tests

2008-10-02 Thread Wes Gamble
When writing functional (e.g. controller unit) tests, I'm running into a simple problem that I'm sure is very easy to fix, but I'm not sure of the correct approach. If I request a resource in my test case, via something like "get :get_template" (where :get_template is an action on my controller),

[Rails] wrong respond_to format used

2008-10-02 Thread Tarscher
Hi all, I have a form that wrongly trigger the rjs respond to with ie7. The html repond_to is correctly used in both FF 3 and Google Chrome. I use the standard form_for helper and have no idea what could cause this issue. I have pased the ie 7 html (left some stuff out) All help is greatly appr

[Rails] Re: New to Rails.

2008-10-02 Thread Lake Denman
Zack K. wrote: > Can someone help me get started, i've been messing around with it > lately, and i also learn some Ruby to understand RoR somemore. I've > been trying to get it too work for awhile, but my problem is that i > can NEVER get mySQL to install in anyway, shape, or form. It's really > a

[Rails] Re: Rails looking for development db in production

2008-10-02 Thread Iain Adams
ps -ef | grep 'mongrel' On Oct 2, 4:01 pm, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On 2 Oct 2008, at 15:51, Schalk Neethling wrote: > > > > > Thanks Fred, > > > I will look into this. How can I ensure that all instances of   > > mongrel is > > stopped? > > look at the output of ps ? > > Fre

[Rails] migration how to?

2008-10-02 Thread Iain Adams
Hello, I am interested in how I add an id field to a table and make it auto increment. Basically at the moment I have a link table with groups_members member_id group_id I am changing this to a membership table id member_id group_id title position I could delete groups_members and create mem

[Rails] Re: Rails looking for development db in production

2008-10-02 Thread Frederick Cheung
On 2 Oct 2008, at 15:51, Schalk Neethling wrote: > > Thanks Fred, > > I will look into this. How can I ensure that all instances of > mongrel is > stopped? > look at the output of ps ? Fred > Schalk > > Frederick Cheung wrote: >> >> On 2 Oct 2008, at 15:43, Schalk Neethling wrote: >> >>> Hi t

[Rails] Re: Off Topic: Lots of Ruby on Rails jobs available

2008-10-02 Thread Frederick Cheung
Please prefix the subject line of messages about jobs with [JOBS] Thanks, Fred On 2 Oct 2008, at 15:51, Ror Jobs wrote: > > Hi All - Just wanted to let you know about a bunch of new jobs now > listed on http://www.RORJobs.com: > > Backend Lead Engineer for Social Network Startup at Plinky, Inc.

[Rails] Re: link to remote + update

2008-10-02 Thread da991319
i already try with form: <% remote_form_for(@sample,:html => {:id => "analyses_list"}) do %> Analyses: <%= render :partial => 'parameters/parameter_name', :collection => @parameters %> <% end %> link: <%= link_to_function("Remove an analysis from sample # [EMAIL PROTE

[Rails] Re: Problems with Routes for user area

2008-10-02 Thread Lake Denman
Denix wrote: > I want such urls in at site: > http://mysite.com/freddy/profile/view > http://mysite.com/freddy/blog/view > > so I want username in my url, and it should use controllers from > folder: member > > And I use this route: > > map.username ":username/:controller/:action/:id", >

[Rails] Cant save a record project-user-role

2008-10-02 Thread Mau
I have a two models Projects and users. I have a many to many relation. Means that all users can be in a project and a user van be in many porjects. A user can be a Member, Admin. i created the relation table as projects_users and added a role_id. For this i created a view that list the users in t

[Rails] Re: Rails looking for development db in production

2008-10-02 Thread Schalk Neethling
Thanks Fred, I will look into this. How can I ensure that all instances of mongrel is stopped? Schalk Frederick Cheung wrote: > > On 2 Oct 2008, at 15:43, Schalk Neethling wrote: > >> Hi there everyone, >> >> On my production server I start the mongrel server as follows: >> >> mongrel_rails

[Rails] Off Topic: Lots of Ruby on Rails jobs available

2008-10-02 Thread Ror Jobs
Hi All - Just wanted to let you know about a bunch of new jobs now listed on http://www.RORJobs.com: Backend Lead Engineer for Social Network Startup at Plinky, Inc. (Lafayette, California) Website Developer/Producer at Speck (Palo Alto, California) Rails Developers for Online Booking Site at L

[Rails] Re: Problem getting Rails to emit the correct (proxy) domain

2008-10-02 Thread Sven
I'm taking a look, Sean. It looks very promising, but I do have a couple of questions. First, we weren't using Rewrite, but rather ProxyPass to set up the front-end server. That is, we have: ProxyPass/neworders http://client.example.com ProxyPassReverse /neworders http://client.exampl

[Rails] help please!!!

2008-10-02 Thread Bhai Jan
Please help me by responding to the above post. Your help will be appreciated. Thanks -- 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] Re: Rails looking for development db in production

2008-10-02 Thread Frederick Cheung
On 2 Oct 2008, at 15:43, Schalk Neethling wrote: > > Hi there everyone, > > On my production server I start the mongrel server as follows: > > mongrel_rails start -e production -a 127.0.0.1 -p 3001 -d > > However when going to the domain I get the following error: > > #42000Unknown database 'sat

[Rails] Rails looking for development db in production

2008-10-02 Thread Schalk Neethling
Hi there everyone, On my production server I start the mongrel server as follows: mongrel_rails start -e production -a 127.0.0.1 -p 3001 -d However when going to the domain I get the following error: #42000Unknown database 'satechevents_development' Why is rails looking for the development da

[Rails] link to remote + update

2008-10-02 Thread da991319
Hi, i need to post a form using AJAX so that I can update and save my object: form: <% form_for(@sample,:html => {:id => "analyses_list"}) do %> Analyses: <%= render :partial => 'parameters/parameter_name', :collection => @parameters %> <% end %> if I am using link_to_f

[Rails] Re: Advice on

2008-10-02 Thread Robby Russell
On Tue, Sep 30, 2008 at 1:36 PM, Cameron McCloud <[EMAIL PROTECTED]> wrote: > > Hi, > > Our group (team of 4) have done a few small-scale Rails applications. > They've been successful enough that we're contemplating a much larger > scale development. > > By scale I don't mean the number of users o

[Rails] Re: New to Rails.

2008-10-02 Thread Zack K.
I have locomotive on OS X 10.5 and i can't get mySQL to install right. That's my main problem. On Oct 2, 9:11 am, Shandy Nantz <[EMAIL PROTECTED]> wrote: > Zack K. wrote: > > Can someone help me get started, i've been messing around with it > > lately, and i also learn some Ruby to understand RoR

[Rails] Re: Adding an action to a ressource

2008-10-02 Thread Thorsten Müller
> I would like to use a pretty path like new_article in order to route > easily on a specific ressource. > In my case, I had added this new action in my articles controller: > ... > In my routes.rb file, I just have this: > map.resources :articles > easy one. you must define all non CRUD actions.

[Rails] No such file or directory

2008-10-02 Thread se_pavel
Hello All, Periodically I have get from live site the following error via email that send me from rescue action of application.rb What do you think happen ? Rails run under FastCGI. Regards, Pavel Error Msg: No such file or directory Trace Msg: C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.1/l

[Rails] Re: New to Rails.

2008-10-02 Thread Bobnation
Windows, Mac, Linux, OpenSolaris? On Oct 2, 12:33 am, "Zack K." <[EMAIL PROTECTED]> wrote: > Can someone help me get started, i've been messing around with it > lately, and i also learn some Ruby to understand RoR somemore. I've > been trying to get it too work for awhile, but my problem is that

[Rails] Adding an action to a ressource

2008-10-02 Thread Panda Beer
Hello everybody, I would like to use a pretty path like new_article in order to route easily on a specific ressource. In my case, I had added this new action in my articles controller: def lock #... end And now I would like to use a path such as: lock_article. But when I do this: rake routes,

  1   2   >