[Rails] Re: where is error in this code

2008-11-04 Thread Morgan Grubb
Kind of fixed version: def create if params[:ticket][:title].empty? flash[:notice] = 'Please fill fields marked with *' redirect_to :action = 'create_ticket_ui' else @contact_id = ContactEmailAddress.get_contact_id(params[:contact_email][:email]) begin

[Rails] Re: where is error in this code

2008-11-04 Thread Sijo Kg
Hi Thanks for your reply. But I did not understand what you mean by superfluous end...But the problem solved when I use begin end for the whole action instead of else part only..So still dont know why Syntax error at first Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Toggle

2008-11-04 Thread Mikael Björkegren
Thanks for the quick reply. But where am i going to put this? I typically do that by also toggling some css class (eg $ ('something').toggleClassName('expanded'). in this case you can probably do this.toggleClassName('some-class') ) Fred %= link_to_function '',

[Rails] Re: UTF-8 compliance in Rails

2008-11-04 Thread kiranH
Hi Fred, I mean in a given message text posted or submitted in a form, special characters are inconsistently rendering. I need to check whether this is a utf problem or an HTML entity management problem? ThanksRegards, Kiran. On Oct 24, 2:41 pm, Frederick Cheung [EMAIL PROTECTED] wrote:

[Rails] HAproxy not listening to all IP address

2008-11-04 Thread deepu
guys, i am trying to install HAproxy infront of my webserver. usually my webserver listens on port 80 and since we have 5 ip address serving 5 different sites on the same physical server the webserver listens to all these ips and proxy the traffic to the relavent app servers. now the

[Rails] Re: Using Inner/Outer join to eager fetch belongs_to associations

2008-11-04 Thread Frederick Cheung
On Nov 4, 7:00 am, Justin Holzer [EMAIL PROTECTED] wrote: I did a bit more looking in to using a :conditions hash to force ActiveRecord to fall back on the Rails 2.0 method of eager fetching associations, and this is absolutely not what I am looking for. For one, the Rails 2.0 eager fetch

[Rails] Re: Toggle

2008-11-04 Thread Frederick Cheung
On 4 Nov 2008, at 09:02, Mikael Björkegren wrote: Thanks for the quick reply. But where am i going to put this? I typically do that by also toggling some css class (eg $ ('something').toggleClassName('expanded'). in this case you can probably do this.toggleClassName('some-class') ) Fred

[Rails] Re: Need to generate xml to be stored in a database

2008-11-04 Thread Frederick Cheung
On 4 Nov 2008, at 13:54, Casey Ellett wrote: I have successfully been able to create the xml I needed as a view, but how do I go from that to storing it as a record in the database? Well, having generated the xml, what's stopping you assigning it to some attribute of some ActiveRecord

[Rails] Re: SQL queries in Rails

2008-11-04 Thread Phillip Koebbe
The Neurochild wrote: Hi... I want to know the equivalent instructions to insert, update, search and delete a registry. I know Rails can do it easily Thanks to ActiveRecord, but here's the catch: I'm using PostgreSQL. As I'm using SQL to do the migration (Including the foreign keys), I

[Rails] Re: Returning changed fields when transaction fails...

2008-11-04 Thread Mark Reginald James
Michael Kahle wrote: Correct. When you say, Here you've already checked that both the records are valid..., you must be referencing the way you coded it. I don't think I'm checking it any time before I run the update.bla.bla! method. See my other post. I think I do not understand when

[Rails] Re: html lists vs html tables

2008-11-04 Thread Phillip Koebbe
Thorsten Mueller wrote: I would use divs here. Your css to get the li display right is at least as abstract as anything you would have to do with the divs. My rough rule of thumb: If a specialized tag does the job, use it. Otherwise go to divs right away. They're the general template tag.

[Rails] Re: Toggle

2008-11-04 Thread Phillip Koebbe
Frederick Cheung wrote: the second argument to link_to_function is an arbitrary javascript fragment. You can put as much in there as you want. Fred To give just a little more detail to what Fred said, you can do something like Effect.toggle('this-thing'); Effect.toggle('that-thing');

[Rails] Re: Need to generate xml to be stored in a database

2008-11-04 Thread Casey Ellett
My complete lack of knowledge of how I would do that. I am very new to this. Can I handle that in the method I've put in the controller to collect the data and render the xml? Currently I am just pulling in a specific category object in the controller and specifying a view: def cat_xml

[Rails] Re: html lists vs html tables

2008-11-04 Thread Hassan Schroeder
On Tue, Nov 4, 2008 at 6:53 AM, Phillip Koebbe [EMAIL PROTECTED] wrote: I use divs for just about everything, even true tabular data. Why deliberately use non-semantic markup? may be mistaken, but I believe that if I were using tables, I wouldn't have as much difficulty with font resizing.

[Rails] Re: html lists vs html tables

2008-11-04 Thread Jean-Marc (M2i3.com)
Garett, Table for layout are generally considered bad but for data when data is tabular you SHOULD be using a table. Using divs, lists or other markup will only cloud the actual meaning of the information you're presenting and depending on the browser the visitor is using you could very well

[Rails] Re: images folder concern when deploying with Capistrano and

2008-11-04 Thread Jean-Marc (M2i3.com)
Hi Tony, Look into Ryan Bates Railscasts... there is one talking about Capistrano (and his tricks when dealing with images and other site specific data). http://railscasts.com/episodes/133-capistrano-tasks Jean-Marc http://m2i3.com/blog/jean-marc

[Rails] Re: Give a user the option to stay logged in.

2008-11-04 Thread Frederick Cheung
On 4 Nov 2008, at 14:53, John Kopanas wrote: I thought this would be so straight forward but it does not seem to be. I want to give users the option when they login to check a checkbox that will leave them logged in but I can not seem to figure out how. On top of that I am trying to

[Rails] Nester Resources, Routes and Class Inheritance

2008-11-04 Thread sw0rdfish
Ok here's a quicky... but a goody :) We have models Company, Reference and Applicant... and References and Applicants just inherit from Company, and are basically companies with the type field set to reference... All companies can have a phone number associated with them, and phone number is a

[Rails] Re: Toggle

2008-11-04 Thread Mikael Björkegren
Got it working thanks for the reply. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: Need to make a radar chart - any good ruby plugins for t

2008-11-04 Thread Joe Peck
Joe Peck wrote: New question: I've searched, but can't find an answer. Is there a way to only show 4 grid lines for a Radar graph that has values up to 100? I just want it to show the grid lines (and values) for 0, 25, 50, 75, and 100. Is there some way to set the interval between grid

[Rails] Re: Check for color

2008-11-04 Thread Hassan Schroeder
On Mon, Nov 3, 2008 at 11:16 AM, Bob Smyph [EMAIL PROTECTED] wrote: I am trying to create an auto test that will check some values on a page and then also make sure that the text on some of the entries is in red and other text in black. Text is just character strings -- it doesn't have

[Rails] Re: code for insert calender

2008-11-04 Thread Shiv N Gautam
http://code.google.com/p/calendardateselect/ -- Shiv On Tue, Nov 4, 2008 at 1:43 PM, Ishara Gunathilake [EMAIL PROTECTED] wrote: i want to create a pop up calendarplease can anyone tell me how to do it -- Spike Milligan - My Father had a profound influence on me, he was a

[Rails] Re: html lists vs html tables

2008-11-04 Thread Phillip Koebbe
Hassan Schroeder wrote: Why deliberately use non-semantic markup? Because I find divs easier to work with, both in the formation and implementation of a particular solution. ...and then, worse, have to try to work around the problems created?? And that is why I'm trying to rethink

[Rails] Re: images folder concern when deploying with Capistrano and

2008-11-04 Thread Tony Tony
Jean-Marc (M2i3.com) wrote: Hi Tony, Look into Ryan Bates Railscasts... there is one talking about Capistrano (and his tricks when dealing with images and other site specific data). http://railscasts.com/episodes/133-capistrano-tasks Jean-Marc http://m2i3.com/blog/jean-marc Hi

[Rails] Re: integration with plone site--insane?

2008-11-04 Thread Pardee, Roy
Thanks! I wondered about that. Does OpenID do actual single-sign on, or is it more that you can use the same credentials from site to site? I think if I put my app out in the wild I'll try to do openid. The trick will be getting the contractor to make that an option for the plone site.

[Rails] Re: html lists vs html tables

2008-11-04 Thread Frederick Cheung
On 4 Nov 2008, at 15:10, Jean-Marc (M2i3.com) wrote: Garett, Table for layout are generally considered bad but for data when data is tabular you SHOULD be using a table. Using divs, lists or other markup will only cloud the actual meaning of the information you're presenting and

[Rails] Re: _session_id and form_for

2008-11-04 Thread tatyree
Found a partial solution, that I've added to pastie. Still having trouble getting hold of the session ID from the post, however. On Nov 4, 12:14 pm, tatyree [EMAIL PROTECTED] wrote: Hi, I've got a mobile enabled app that needs to be able to pass _session_id for certain phones/operators that

[Rails] Re: Need to generate xml to be stored in a database

2008-11-04 Thread Casey Ellett
I have successfully been able to create the xml I needed as a view, but how do I go from that to storing it as a record in the database? On Mon, Nov 3, 2008 at 5:44 PM, Frederick Cheung [EMAIL PROTECTED] wrote: On Nov 3, 9:51 pm, casey.ellett [EMAIL PROTECTED] wrote: Forgive my

[Rails] How to query across several tables?

2008-11-04 Thread Tom Ha
Hi there, In the model situation Book :has_many Stories, I would like to do something like this: Book.find(:all, :conditions = { book.story.id = @story_ids }) ...which of course doesn't work with book.story.id =... (- undefined local variable or method 'book') What's the correct query syntax

[Rails] Re: html lists vs html tables

2008-11-04 Thread Hassan Schroeder
On Tue, Nov 4, 2008 at 8:11 AM, Phillip Koebbe [EMAIL PROTECTED] wrote: So many people say that it's an evil of incredible magnitude to use tables for layouts, it becomes very easy to let it swing too far the other way and not use tables at all. A bizarre over-reaction I've noticed but

[Rails] Re: Single sign on

2008-11-04 Thread Robert Walker
I suppose that would depend on how the authentication is handled in the asp.net application. Is it HTML form based, HTTP Basic Authentication, or something else? I'm using asp.net application and i access this from cURL .Now i want to know,how to use single sign on in cURL. I assume from

[Rails] Re: Using Inner/Outer join to eager fetch belongs_to associations

2008-11-04 Thread Pardee, Roy
But is a plugin really required? Can't you feed something to find_by_sql that will get you both types of objects? -Original Message- From: rubyonrails-talk@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Frederick Cheung Sent: Tuesday, November 04, 2008 1:32 AM To: Ruby on

[Rails] Re: Need to generate xml to be stored in a database

2008-11-04 Thread Sheryl Barrow
On Tue, Nov 4, 2008 at 11:09 AM, Frederick Cheung [EMAIL PROTECTED] wrote: Or am I going down the wrong path here? I don't actually need to view the xml at any point - I'm actually going to pull it out of the database at a later point and send it up to a web service. Or I guess I

[Rails] Re: html lists vs html tables

2008-11-04 Thread Garrett Berneche
I understand the difference between tables for layout and tables for tabular data, but I am also running headlong into problems with tables and AJAX. Am I just being really dense? I want to have a table where I can I replace certain parts of it (edit a row in place when you click on it, filter

[Rails] Re: How to query across several tables?

2008-11-04 Thread Tom Ha
Got it working like that - thanks very much! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Help Community Project Development

2008-11-04 Thread Sayeed
Hello all, I have no idea of ruby on rails and read some articles and found out it is good, flexible, understandable and very efficient for web applications. I am planning to start a community project and looking for good web technology to use. Can anybody let me know the pros, cons, performance

[Rails] Re: html lists vs html tables

2008-11-04 Thread Jean-Marc (M2i3.com)
If you're using input fields to filter you don't need to embed them into a form... that way you can put the fields directly into some TD`s (better... intject those directly with Javascript so they are not present on the non-interactive version of your page). On Nov 4, 12:08 pm, Garrett Berneche

[Rails] Re: uninitialized constant ODBC::SQL_DBMS_NAME

2008-11-04 Thread Kiss Kisscool
Hello, I have the same problem. My connection works with dbi connection: irb(main):008:0 DBI.connect('dbi:ODBC:ServeurBDDSQL', 'toto', 'password') do |dbh| irb(main):009:1* dbh.select_all('select N_contrat from contrats where id_contrat = 593;') do |row| irb(main):010:2* p row irb(main):011:2

[Rails] ISP denies HTTP DELETE in httpd.conf ?

2008-11-04 Thread gummybears
Hi, I discovered that my webhoster denies HTTP delete's. They suggest I can do the same via HTTP get's. As I explained to them I am using their Rails framework via REST and CRUD, it seems either they don't know what they are doing or I have to do some serious thinking. As I am developing an web

[Rails] Time zone and UTC offset

2008-11-04 Thread MR Damien
Hi all, I am trying to change a date from a time zone to UTC. First I set the time zone and then get its offset from UTC. Then I am trying to change the time zone of my date by substracting the offset but it failed. --- Time.zone = @time_zone # 'Paris' @offset =

[Rails] Re: put the list of posts in descending order

2008-11-04 Thread Thorsten Müller
the last i last i entered is displayed first ..but i want to display it in descending order,,,that mean the newly entered record should display at the top of the page Isn't that the same? Last/newly entered display first? anyway, in the examples replace DESC by ASC to revert order if your

[Rails] Re: Time zone and UTC offset

2008-11-04 Thread Frederick Cheung
On Nov 4, 5:32 pm, MR Damien [EMAIL PROTECTED] wrote: Hi all, I am trying to change a date from a time zone to UTC. First I set the time zone and then get its offset from UTC. Then I am trying to change the time zone of my date by substracting the offset  but it failed.

[Rails] Re: ISP denies HTTP DELETE in httpd.conf ?

2008-11-04 Thread Philip Hallstrom
On Nov 4, 2008, at 9:28 AM, gummybears wrote: Hi, I discovered that my webhoster denies HTTP delete's. They suggest I can do the same via HTTP get's. As I explained to them I am using their Rails framework via REST and CRUD, it seems either they don't know what they are doing or I have

[Rails] Re: Error running rake db:test:prepare

2008-11-04 Thread Frederick Cheung
On Nov 4, 4:12 am, Keith Litwin [EMAIL PROTECTED] wrote: Hey all, I am getting syntax errors in my schema.rb when I run rake db:test:prepare.  In my migrations, I have created columns that look like this... add_column :prizes, :paypal_amount, :decimal, :precision = 8, :scale = 2,

[Rails] _session_id and form_for

2008-11-04 Thread tatyree
Hi, I've got a mobile enabled app that needs to be able to pass _session_id for certain phones/operators that cannot/will not handle cookies. I've outlined the problem here and given the code here: http://pastie.org/307103 Basically, I cannot get form_for to pick up the _session_id on cookie-

[Rails] Re: Easiest RoR - PDF solution (based on HTML and CSS)

2008-11-04 Thread paco.onrails
Thanks for your suggestions, I have htmldoc working good on my application. Paco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] JSON problems in update method (ExtJs, Ext)

2008-11-04 Thread Adam Wilson
Hello rubyonrails peeps, my first post here. I've been having a lot of trouble today getting my controller to respond properly to an update request via json, coming from an EditorGridPanel in ExtJS. I started off by using the ExtScaffold plugin (which is great but limited in its examples), and

[Rails] First ever full day Ruby On Rails event in India

2008-11-04 Thread Sur
Hi Everyone, If you are in India, and you like to code in Ruby and enjoy Ruby On Rails... join in RubyFunDay to have real fun with Ruby... http://rubyonrails.in/events/3 regards, Sur --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] PDF builder that support SWF (Macromedia Flash) embedding

2008-11-04 Thread paco.onrails
Hello, I need to create a PDF report that includes a Flash chart (FusionCharts) embedding option. Any suggestion? Paco Reyes --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

[Rails] Re: html lists vs html tables

2008-11-04 Thread Phillip Koebbe
Hassan Schroeder wrote: On Tue, Nov 4, 2008 at 8:11 AM, Phillip Koebbe A bizarre over-reaction I've noticed but never understood... There are a lot of bizarre overreactions in the IT world. For those of us who are not leaders but followers, it can sometimes be difficult to filter out the

[Rails] Re: SQL queries in Rails

2008-11-04 Thread The Neurochild
But what about the datatypes of SQL? First, I have some columns with a char datatype and I want them that way. Secondly, I saw, when I define a :string column with a :default value, that value doesn't appear reflected in the database. In the last catch, what could be wrong? I'm using Rails 1.2.6

[Rails] Re: Updating Rails

2008-11-04 Thread Richie
Hi guys, after posting I suddenly remembered I used the 'sudo' command when initially installing rails!! Have been a mac user for nearly 10 years and new to unix the shell in os x but quickly getting the hang of things through practice! Thanks for the swift response anyway, much appreciated.

[Rails] Re: ISP denies HTTP DELETE in httpd.conf ?

2008-11-04 Thread Robert Walker
If it's a RESTful client that really speaks REST then you're gonna be in trouble. Why would he be in trouble? What would stop him from sneaking in the same parameter into a POST request just like Rails does? Verb URL: POST /resources/1 Parameters: _method=DELETE Would that not work? I'm

[Rails] Re: where is error in this code

2008-11-04 Thread Frederick Cheung
On 4 Nov 2008, at 10:00, Sijo Kg wrote: Hi One more question related to this What I understood from your reply was rescue placed inside the begin end block(Am I right?)..Could you please tell how following working ? begin

[Rails] Re: SQL queries in Rails

2008-11-04 Thread Phillip Koebbe
The Neurochild wrote: But what about the datatypes of SQL? First, I have some columns with a char datatype and I want them that way. Secondly, I saw, when I define a :string column with a :default value, that value doesn't appear reflected in the database. In the last catch, what could be

[Rails] Re: Routing to a new action of a nested resource

2008-11-04 Thread Vahagn Hayrapetyan
PS! Correct url is http://localhost:3000/users/21/house/new :-) -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

[Rails] Re: Which status code for validation errors

2008-11-04 Thread Frederick Cheung
On 4 Nov 2008, at 12:02, Marko Anastasov wrote: Hi, I need to manually specify an HTTP response code after I catch the ActiveRecord::RecordInvalid exception - as validation fails for data submitted via remote_form_for. Which one would be most appropriate? Currently I do: render :action

[Rails] Re: ISP denies HTTP DELETE in httpd.conf ?

2008-11-04 Thread Robert Walker
P.S Their comment was, DELETE's are very old, you can do the same with GET's, but the HTTP return code is different. They only allow the following requests GET POST OPTIONS PROPFIND P.P.S. They are very uninformed. DELETE has always been, and continues, to be an integral part of HTTP. Web

[Rails] Routing to a new action of a nested resource

2008-11-04 Thread Vahagn Hayrapetyan
Hi, can anyone help with a routing problem for nested resources: My models are User (has_one :house) and House (belongs_to :user). I have a houses_controller and a user_house_controller. house_controller is for the admin to perform CRUD on houses; so users' CRUD must go through the

[Rails] Unknown action No action responded to show

2008-11-04 Thread Baba Bobo
Hi, I am new to ruby, so pardon me if i am asking something basic. I am trying to create a simple test application where a user registers for a account and can see his profile and edit his profile. the navigation looks like following: Register | Profile | Edit_Profile Profile and

[Rails] Re: SQL queries in Rails

2008-11-04 Thread The Neurochild
On Nov 5, 2:07 pm, Phillip Koebbe [EMAIL PROTECTED] wrote: if you want to use a char instead of a character varying, you can override native_database_types to include a :char definition. Really? How do I override it? I'm interested. Sorry if I have many trivial questions, but I'm really new

[Rails] Re: Unknown action No action responded to show

2008-11-04 Thread Baba Bobo
Baba Bobo wrote: sorry the correct/working URL for Profile page is http://localhost:3000/user/profile/1 -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: Need to generate xml to be stored in a database

2008-11-04 Thread Casey Ellett
I'll give this a go tonight. Thanks. On Tue, Nov 4, 2008 at 12:02 PM, Sheryl Barrow [EMAIL PROTECTED] wrote: On Tue, Nov 4, 2008 at 11:09 AM, Frederick Cheung [EMAIL PROTECTED] wrote: Or am I going down the wrong path here? I don't actually need to view the xml at any point - I'm

[Rails] Re: Routing to a new action of a nested resource

2008-11-04 Thread Vahagn Hayrapetyan
Issue solved! users.resource :houses, :controller = 'user_house' instead of: users.resource :house, :controller = 'user_house' end Apparently the resources are always plural, regardless that a user only has one house. /V. -- Posted via http://www.ruby-forum.com/.

[Rails] collection_select broken in 2.1.x?

2008-11-04 Thread [EMAIL PROTECTED]
Greetings, Can someone verify for me if collection_select is broken in Rails 2.1.x? I have an administrative form where an administrator can update the subscription level of a user. In the partial I say %= collection_select(:user, :subscriptiontype_id, Subscriptiontype.find(:all), :id,

[Rails] Re: SQL queries in Rails

2008-11-04 Thread Phillip Koebbe
The Neurochild wrote: On Nov 5, 2:07 pm, Phillip Koebbe [EMAIL PROTECTED] wrote: if you want to use a char instead of a character varying, you can override native_database_types to include a :char definition. Really? How do I override it? I'm interested. Sorry if I have many trivial

[Rails] Re: put the list of posts in descending order

2008-11-04 Thread Ishara Gunathilake
thankxil try 2008/11/4 Thorsten Müller [EMAIL PROTECTED] the last i last i entered is displayed first ..but i want to display it in descending order,,,that mean the newly entered record should display at the top of the page Isn't that the same? Last/newly entered display first?

[Rails] Re: html lists vs html tables

2008-11-04 Thread Thorsten Müller
I would use divs here. Your css to get the li display right is at least as abstract as anything you would have to do with the divs. My rough rule of thumb: If a specialized tag does the job, use it. Otherwise go to divs right away. They're the general template tag. If you have a list, use li but

[Rails] Re: Speak at Acts as Conference 2009

2008-11-04 Thread Robert Dempsey
Not really, but it gets the point across. - Robert Dempsey On Oct 30, 3:05 pm, Fernando Perez [EMAIL PROTECTED] wrote: acts_as_conference? Is it possible to find a more ridiculous name? -- Posted viahttp://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You

[Rails] Re: Unknown action No action responded to show

2008-11-04 Thread Baba Bobo
Baba Bobo wrote: If I add the following code to my only controller file user_controller.rb def show @user = User.find(params[:user]) respond_to do |format| format.html # show.html.erb format.xml { render :xml = @user } end end After which when i refresh the Registeration page

[Rails] Re: Updating Rails

2008-11-04 Thread Andrew Porter
Richie wrote: ERROR: While executing gem ... (Errno::EACCES) Permission denied - /usr/local/lib/ruby/gems/1.8/cache/ Has anyone else come across this problem now or in the past? If so please can you help me!! you don't have permission to write in that location. Run the update as

[Rails] Re: where is error in this code

2008-11-04 Thread Frederick Cheung
On Nov 4, 8:45 am, Sijo Kg [EMAIL PROTECTED] wrote: Hi     Thanks for your reply. But I did not understand what you mean by superfluous end...But the problem solved when I use begin end for the whole action instead of else part only..So still dont know why Syntax error at first because

[Rails] Re: SQL queries in Rails

2008-11-04 Thread The Neurochild
On Nov 5, 2:40 pm, Phillip Koebbe [EMAIL PROTECTED] wrote: Each database adapter has the ability to define the database types Rails uses when building DDL. The method used is native_database_types, which is, in the case of PostgreSQL, found in the PostgreSQL class of the ConnectionAdapters

[Rails] Re: Unknown action No action responded to show

2008-11-04 Thread Ar Chron
Controllers are customarily named in the plural... UsersController, as opposed to UserController. What does a rake routes report to you? rake routes routes.lst Then peruse that file... You're mixing restful routes with non-restful ones I think, and earlier routes are evaluated before later

[Rails] Re: remote_form_for, paths, and partials

2008-11-04 Thread Antonio Rossi
Daniel Fac wrote: hi, i'm having a little trouble rendering a partial that uses a remote_form_for and is in another controller. %= render :partial = reviews/new-% and in the partial i have only this, inside another controller % remote_form_for @review do |rv|-% %= rv.hidden_field :value,

[Rails] Re: SQL queries in Rails

2008-11-04 Thread Phillip Koebbe
The Neurochild wrote: Whoa! Awesome! I would like to apply that and the foreign key thing, but is there a folder where I can save and call my file? Where do you place it in your case? Different people have different ways of organizing things like this. I put stuff like this in files in

[Rails] Re: Routes: Root as Users#Show

2008-11-04 Thread Ar Chron
In the controller, couldn't you look for/at params[:id] to see if the request was for a user other than themselves? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Nester Resources, Routes and Class Inheritance

2008-11-04 Thread Jeff
On Nov 4, 9:46 am, sw0rdfish [EMAIL PROTECTED] wrote: Ok here's a quicky... but a goody :) We have models Company, Reference and Applicant... and References and Applicants just inherit from Company, and are basically companies with the type field set to reference... All companies can have

[Rails] Re: SQL queries in Rails

2008-11-04 Thread The Neurochild
Thanks, man! I'm going to try it right now And I'll post the results later. Greetings! The Neurochild --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: html lists vs html tables

2008-11-04 Thread Hassan Schroeder
On Tue, Nov 4, 2008 at 10:55 AM, Phillip Koebbe [EMAIL PROTECTED] wrote: There are a lot of bizarre overreactions in the IT world. So true. And I'm not trying to minimize the difficulty of keeping up with rapidly evolving technologies and best practices. I doubt there's anyone who doesn't feel

[Rails] Re: collection_select broken in 2.1.x?

2008-11-04 Thread [EMAIL PROTECTED]
The dropdown shows the proper entries but the current value of user.subscriptiontype_id is never selected. OK, nevermind, I had created user.subscriptiontype_id with the wrong type (string). Fixing this fixed the problem. --cro --~--~-~--~~~---~--~~ You

[Rails] guide to moving Rails 1 app to Rails 2?

2008-11-04 Thread Jonathan Rochkind
Are there any guides available on what must be done to move an app written with Rails 1.x to the latest Rails 2.x? I'm having trouble finding such a thing in Google. Thanks for any pointers! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You

[Rails] RMagick Windows Ruby 1.8.7. Do I need to compile?

2008-11-04 Thread Chris Dekker
The current version of RMagick 2.7.1 is being served as a pre-built gem for Windows for Ruby 1.8.6 I happen to run Ruby 1.8.7 (pl-0) on Windows and was wondering if there is a way I can get RMagick to run in combination with this, or is the only solution to downgrade to Ruby 1.8.6? Some threads

[Rails] Re: SQL queries in Rails

2008-11-04 Thread Gabriel Laskar
On Tue, Nov 4, 2008 at 9:22 PM, Phillip Koebbe [EMAIL PROTECTED] wrote: There is also a way to do something like this with initializers, but I haven't yet taken the time to research it. In order to have this with initializers, it is more simple, you just drop the file in the

[Rails] Re: Nester Resources, Routes and Class Inheritance

2008-11-04 Thread sw0rdfish
Ok so I tried your way, and I got an error; compile error syntax error, unexpected '(', expecting kEND _erbout = ''; form_for :company_phone_number_path( [EMAIL PROTECTED], @phone_number] ) do |f| ; _erbout.concat \n So I did a little digging to see the syntax for it, and I came up with %

[Rails] Re: HAproxy not listening to all IP address

2008-11-04 Thread Maurício Linhares
Make HAproxy listen for the 0.0.0.0 IP, this will make it listen on all possible IPs for your machine. - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) João Pessoa, PB, +55 83 8867-7208 On Tue, Nov 4, 2008 at 4:34 AM, deepu [EMAIL PROTECTED]

[Rails] Re: ISP denies HTTP DELETE in httpd.conf ?

2008-11-04 Thread Philip Hallstrom
On Nov 4, 2008, at 11:02 AM, Robert Walker wrote: If it's a RESTful client that really speaks REST then you're gonna be in trouble. Why would he be in trouble? What would stop him from sneaking in the same parameter into a POST request just like Rails does? Verb URL: POST /resources/1

[Rails] Re: rescue_from and assert_raise

2008-11-04 Thread Michael Irwin
Anyone have any input on this? On Oct 24, 11:14 am, Michael Irwin [EMAIL PROTECTED] wrote: Since commit 5e3517ea7b9fbd460f772bffc9212d882011f2bc, rescue_from is now being handled in tests.  I've been using rescue_from to handle custom exceptions and testing that those exceptions are raised in

[Rails] observe_field with select throwing javascript error

2008-11-04 Thread Corey Murphy
Using the following simple form with a select box, the observe_field is throwing a javascript error related to the getValue() method in the prototype library. Any ideas as to why? Everything that I can tell is well formed syntactically. I'm running Rails 2.1.0. % form_tag :action = :new do %

[Rails] Re: Unknown action No action responded to show

2008-11-04 Thread Baba Bobo
Ar Chron wrote: Controllers are customarily named in the plural... UsersController, as opposed to UserController. What does a rake routes report to you? Thanks for the prompt reply. I agree i am messing up somewhere with the restful routing. By the time i am playing with the custom

[Rails] Re: Rails 2.1.1 setting datetime to nil at 00:00:00

2008-11-04 Thread George
Whenever I need to store and manipulate a date independent of time, I prefer using the SQL Date type and corresponding ActiveSupport Date type. It's a lot cleaner for parsing and validating. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Rails] Re: Unknown action No action responded to show

2008-11-04 Thread Baba Bobo
By the way I have issue with the register page not the profile page. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

[Rails] Re: Single sign on

2008-11-04 Thread venu gopal
hi, I'm using asp.net application and i access this from cURL .Now i want to know,how to use single sign on in cURL. Reply as soon as possible --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Which status code for validation errors

2008-11-04 Thread Marko Anastasov
Hi, I need to manually specify an HTTP response code after I catch the ActiveRecord::RecordInvalid exception - as validation fails for data submitted via remote_form_for. Which one would be most appropriate? Currently I do: render :action = 'new', :status = 409 # conflict Marko

[Rails] Re: where is error in this code

2008-11-04 Thread Sijo Kg
Hi One more question related to this What I understood from your reply was rescue placed inside the begin end block(Am I right?)..Could you please tell how following working ? begin SDMailer.delive_to_send_mail_to_user(name,email_id,ticket_no) unless email_id.blank? end rescue

[Rails] Re: where is error in this code

2008-11-04 Thread Sijo Kg
Hi Thanks for the reply Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: How to query across several tables?

2008-11-04 Thread Andrew Porter
Tom Ha wrote: Hi there, In the model situation Book :has_many Stories, I would like to do something like this: Book.find(:all, :conditions = { book.story.id = @story_ids }) ...which of course doesn't work with book.story.id =... (- undefined local variable or method 'book') What's

[Rails] Re: Are there plugins available for Hpricot or Mechanize

2008-11-04 Thread Cs Webgrl
I also saw this for Rails 2.1 that I could put into the environment.rb file. config.gem hpricot, :version = '0.6', :source =http://code.whytheluckystiff.net; If I put this code in environment.rb, then I'll still need to run rake:gems install on each machine that this application is

[Rails] Create 50 objects and show only them

2008-11-04 Thread Medwedj Potapow
Hello all! Situation: user has a possibility to create variable amount number of objects. The number choses user himself. After creating user wants to see all just created objects. And only them. Not the rest. How can it be done? I put all created object in an array but what then? Redirecting

[Rails] Re: guide to moving Rails 1 app to Rails 2?

2008-11-04 Thread Craig Demyanovich
I once read that, if you're upgrading from a release that is several releases or a major release behind your target version, i.e., 1.x to 2.x, you should upgrade gradually. Say you're on 1.2.2. 1.2.2 - latest 1.2.x release latest 1.2.x release to latest 2.0.x release latest 2.0.x release to

  1   2   >