Re: [Rails] Re: Question about rails modules/applications

2010-01-12 Thread Conrad Taylor
On Mon, Jan 11, 2010 at 11:42 PM, Friedrich friedrichdomini...@googlemail.com wrote: On 12 Jan., 03:55, Marnen Laibow-Koser li...@ruby-forum.com wrote: Friedrich wrote: Can anyone give me an oversight about rails applicatoin in the following areas? - bookkeeping - crm Here's

[Rails] Re: Capistrano deploy without irs_process_scripts

2010-01-12 Thread Ale Ds
Marnen Laibow-Koser wrote: Passenger? No I am not using Passenger but Apache+Mongrel, in this case have I to use irs_process_scripts ? or maybe is there other way ? Alessandro DS -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] Need help regarding Ajax and REST

2010-01-12 Thread rajaramyadhav
Hi all, I am a newbie to Ruby on Rails. I need some help from you guys. I need to create a page with Ajax stuff. Now for this should the methods in controllers be non-REST type? I went through the Agile Web Development with Rails and in the cart example that they have given, they have used that

Re: [Rails] Autotest - Can make an-install work.

2010-01-12 Thread Colin Law
2010/1/11 Rodrigo Dellacqua rgoyta...@gmail.com: It should be CAN'T make, duh. Okay, after installing the gem this is what I get.. For more information on autotest_notification, see http://github.com/carlosbrando/autotest-notification/ To turn on the notifier you need to run the following

Re: [Rails] HELP ON RENDER FILE METHOD

2010-01-12 Thread Colin Law
2010/1/12 Newb Newb li...@ruby-forum.com: Dear all, kindly look at the below code %= link_to image_tag(backup_configure.png,:title = view chat),{:action = open_live_file,:file_path = @file_path},{:target = '_new'} % def open_live_file  #--   �...@backup =

Re: [Rails] Question on Render :file = file

2010-01-12 Thread Colin Law
2010/1/12 Newb Newb li...@ruby-forum.com: Dear Friends, I use render :file method to display html file which has images in it . The render file method not displays a HTML file with images that's exists inside public folder. Both my HTML files and images refereed are in the public folder

Re: [Rails] Re: HOW TO MAP OUTSIDE THE RAILS DIRECTORY

2010-01-12 Thread Colin Law
2010/1/12 Newb Newb li...@ruby-forum.com: Curtis Schofield wrote: well i wouldn't recommend it. You may be able to get FollowSymLinks in apache and make a symlink if you are on unix. Probably what you want is to set up apache with a rewrite rule to pull from a different vhost. those

[Rails] store objects with a custom attribute

2010-01-12 Thread LeonS
Hi, i try to store objects which differ through a complicated relationship. So e.g. i want to store the moderators, the user ... of another object. Currently i create an array for each relationship where i store the users with this particular relationship (@members_users, @members_moderators,

Re: [Rails] updating user status

2010-01-12 Thread Andy Jeffries
user_statuses is a master table having values id name 1 Pending 2 Approved 3 Deleted My first question is why do you have a table for user_status? Are administrators of your app going to be adding new statuses via a web interface? if not, why not just have constants: class User

[Rails] Re: Capistrano deploy without irs_process_scripts

2010-01-12 Thread Frederick Cheung
On Jan 12, 8:50 am, Ale Ds li...@ruby-forum.com wrote: Marnen Laibow-Koser wrote: Passenger? No I am not using Passenger but Apache+Mongrel, in this case have I to use irs_process_scripts ? or maybe is there other way ? We've got monit stopping/starting mongrels. Fred -- You received

[Rails] Re: 501 and 405 slightly inaccurate?

2010-01-12 Thread Frederick Cheung
On Jan 12, 12:07 am, AJ ONeal alvin.on...@gmail.com wrote: Since Rails routes know which methods are implemented per controller, why does Allows always contain these items? Allows = POST, GET, PUT, DELETE Shouldn't the list be built by polling a method? Something like:

[Rails] Integration testing ..

2010-01-12 Thread Hemant Bhargava
Hi Champs, Actually i am writing integration tests for my application. I am working on the test environment. I am checking out that - - Are all the pages accessible to admin by creating a session ? - The same way are the same pages are not accessible to normal user? I have defined a module and

Re: [Rails] Autotest - Can make an-install work.

2010-01-12 Thread Rodrigo Dellacqua
Guys, What happens is that my var/lib/gems/bin folder wasn't in the path, (that's where it installs the an-install script) I put it on the path and it works. []'s Rodrigo Dellacqua On Tue, Jan 12, 2010 at 6:36 AM, Colin Law clan...@googlemail.com wrote: 2010/1/11 Rodrigo Dellacqua

[Rails] Re: how to create portable rails app?

2010-01-12 Thread Ralu rm
Leonardo Mateo wrote: On Tue, Jan 12, 2010 at 2:40 AM, Ralu rm li...@ruby-forum.com wrote: Hi, i have a rails app which is done with instant rails, now i need to take the app to  other computer and use it without migrating , that is plug and play use of that application, can anyone help with

[Rails] Web with images

2010-01-12 Thread Guille San
I wanna to create a web page with instant rails. In my web page I wanna to show some pictures. What is the code I need to show it Thanks a lot!! -- 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

[Rails] Re: Problem with Sessions

2010-01-12 Thread Jon Cox
MattWim wrote: Thanks for your input guys, I have sorted the problem with the simplest of solutions I should have tried earlier... Restarted my pc, something must have messed up maybe with MySQL or maybe with my browser. I just got so used to it being my dodgy code!! Amazing how you can

Re: [Rails] Re: how to create portable rails app?

2010-01-12 Thread Leonardo Mateo
On Tue, Jan 12, 2010 at 10:29 AM, Ralu rm li...@ruby-forum.com wrote: Leonardo Mateo wrote: On Tue, Jan 12, 2010 at 2:40 AM, Ralu rm li...@ruby-forum.com wrote: Hi, i have a rails app which is done with instant rails, now i need to take the app to  other computer and use it without migrating

[Rails] Keep getting syntax error

2010-01-12 Thread John Merlino
Hey all, I keep getting a syntax error somewhere in this code. Thanks for all help. class StudentState ActiveRecord::Base has_many :students end class Student ActiveRecord::Base belongs_to :student_state named_scope :filtertabs, :join = :student_state, lambda { |*args| {:conditions =

[Rails] How to handle Profile Informations with :has_many_through ?

2010-01-12 Thread LeonS
Hi, i try to implement a Profile System for the users into my Rails App. i want to implement it with these models: class Profile ActiveRecord::Base has_many :Profileships has_many :users, :through = :Profileships # Gehört zu einer Profil Gruppe belongs_to :profile_group end class

[Rails] Re: Keep getting syntax error

2010-01-12 Thread Frederick Cheung
On Jan 12, 2:25 pm, John Merlino li...@ruby-forum.com wrote: {:conditions = {'student_state.id = ?', args}} } This is wrong - I assume you meant 'student_state.id' = args Fred -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

Re: [Rails] Web with images

2010-01-12 Thread Colin Law
2010/1/12 Guille San li...@ruby-forum.com: I wanna to create a web page with instant rails. In my web page I wanna to show some pictures. What is the code I need to show it If you have not already done so then have a look at the Getting Started rails guide (google Rails Guides). Then

[Rails] Re: Keep getting syntax error

2010-01-12 Thread John Merlino
Frederick Cheung wrote: On Jan 12, 2:25 pm, John Merlino li...@ruby-forum.com wrote: {:conditions = {'student_state.id = ?', args}} } This is wrong - I assume you meant 'student_state.id' = args Fred After I change it to: named_scope :filtertabs, :join = :student_state, lambda { |*args|

[Rails] Re: Keep getting syntax error

2010-01-12 Thread Frederick Cheung
On Jan 12, 3:15 pm, John Merlino li...@ruby-forum.com wrote: Frederick Cheung wrote: After I change it to: named_scope :filtertabs, :join = :student_state, lambda { |*args| {:conditions = {'student_state.id' = args}} } I still get a syntax error. Your lambda should return a single hash

[Rails] wwwwwwwwwwwwwwwwwwww

2010-01-12 Thread rob
ww -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com.

Re: [Rails] wwwwwwwwwwwwwwwwwwww

2010-01-12 Thread Colin Law
2010/1/12 r...@agileconsultingllc.com: ww I presume you have a typing impediment. We always try our best to help those with disabilities, relax and try again to ask your question and we will do our best to help. Colin -- You received this message because you are

Re: [Rails] wwwwwwwwwwwwwwwwwwww

2010-01-12 Thread Dhruva Sagar
that was a good 1 :) Thanks Regards, Dhruva Sagar. On Tue, Jan 12, 2010 at 9:01 PM, Colin Law clan...@googlemail.com wrote: 2010/1/12 r...@agileconsultingllc.com: ww I presume you have a typing impediment. We always try our best to help those with disabilities,

[Rails] Best practices for Rails API testing ?

2010-01-12 Thread Camille Roux
Hello, I'm developing an API in XML and JSON and I'd to know how you do to test it. I thought to create ActiveRessource classes and use them in Cucumber. By the way, I've a problem with that, I don't know on which port Cucumber lunch Rails. So I don't know what URL to give to the

[Rails] pluralization question

2010-01-12 Thread Me
Is there a way to pluralize the have/has section of a sentence easily? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: Craiglist and tracking views

2010-01-12 Thread Matt Jones
On Jan 11, 2:49 pm, Quee WM li...@ruby-forum.com wrote: Seems the post was buried and might have gotten off radar. -- Posted viahttp://www.ruby-forum.com/. Not so much - I just don't think there's any way to do what you're trying. As far as I know, Craigslist doesn't take HTML ads, and the

[Rails] Re: How to handle Profile Informations with :has_many_through ?

2010-01-12 Thread PsiPro
What you have setup there is a Many to Many association. Is that really what you want? Can one profile belong to multiple users? If you give us a better understanding of your end goal we may be able to help more. On Jan 12, 9:32 am, LeonS leonard.stellbr...@gmail.com wrote: Hi, i try to

[Rails] Re: Question on Render :file = file

2010-01-12 Thread Matt Jones
On Jan 12, 4:54 am, Colin Law clan...@googlemail.com wrote: Is this the same question as in the thread titled HELP ON RENDER FILE METHOD?  If so I have posted some suggestions there.  There is not much point asking the same question in two threads. Actually, it's the same question from: -

[Rails] Re: pluralization question

2010-01-12 Thread PsiPro
Disclaimer: english isn't my best subject. Have and has don't have a plural, it depends on the target I have You have We have She has He has On Jan 12, 10:55 am, Me chabg...@gmail.com wrote: Is there a way to pluralize the have/has section of a sentence easily? -- You received this message

[Rails] Re: pluralization question

2010-01-12 Thread Me
Talking more like You have X work/works that (have/has) been created On Jan 12, 10:06 am, PsiPro arjes...@gmail.com wrote: Disclaimer: english isn't my best subject. Have and has don't have a plural, it depends on the target I have You have We have She has He has On Jan 12, 10:55 am,

Re: [Rails] Re: Mongrel to Apache

2010-01-12 Thread Norm Scherer
Marnen Laibow-Koser wrote: ... Yup. It's hard to think of a good reason to use Mongrel with Apache these days. Best, --  Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org Running on Windows might be a reason -- You received this message because you are

Re: [Rails] Re: how to create portable rails app?

2010-01-12 Thread Norm Scherer
Ralu rm wrote: Leonardo Mateo wrote: On Tue, Jan 12, 2010 at 2:40 AM, Ralu rm li...@ruby-forum.com wrote: Hi, i have a rails app which is done with instant rails, now i need to take the app to  other computer and use it without migrating , that is plug and play use

[Rails] Re: How to handle Profile Informations with :has_many_through ?

2010-01-12 Thread LeonS
Thats right, because every User has the same profile fields , the possible Profile fields are saved in the Profile model. The value of a profile field of one user is saved in the Profileship model in the field value. So how can i put that in a view based on the Profilegroup? -- You received this

[Rails] Re: Integration testing ..

2010-01-12 Thread Marnen Laibow-Koser
Hemant Bhargava wrote: Hi Champs, Actually i am writing integration tests for my application. Why are you doing that? Use Cucumber instead. It does the same job, but it's much easier to work with. Best, --  Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via

[Rails] Re: pluralization question

2010-01-12 Thread Marnen Laibow-Koser
Chris Habgood wrote: Talking more like You have X work/works that (have/has) been created Sure, just test the value of X. If you're using gettext for i18n, look at the various methods named things like n_. Best, --  Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via

[Rails] Re: How to handle Profile Informations with :has_many_throug

2010-01-12 Thread Marnen Laibow-Koser
LeonS wrote: Thats right, because every User has the same profile fields , the possible Profile fields are saved in the Profile model. The value of a profile field of one user is saved in the Profileship model in the field value. So how can i put that in a view based on the Profilegroup?

[Rails] Re: Keep getting syntax error

2010-01-12 Thread John Merlino
Frederick Cheung wrote: On Jan 12, 3:15 pm, John Merlino li...@ruby-forum.com wrote: Frederick Cheung wrote: After I change it to: named_scope :filtertabs, :join = :student_state, lambda { |*args| {:conditions = {'student_state.id' = args}} } I still get a syntax error. Your lambda

Re: [Rails] Re: Weird POST/PUT behavior

2010-01-12 Thread Curtis Cooley
On Mon, Jan 11, 2010 at 9:57 PM, Ritchie ritch...@gmail.com wrote: I haven't looked at the recipe you refer to but most browsers will only do posts. That's why Rails form helpers simulate doing a put by adding a hidden field called _method to the form which rails then checks for before passing

[Rails] Re: Keep getting syntax error

2010-01-12 Thread Frederick Cheung
On Jan 12, 4:58 pm, John Merlino li...@ruby-forum.com wrote: Frederick Cheung wrote: On Jan 12, 3:15 pm, John Merlino li...@ruby-forum.com wrote: Frederick Cheung wrote: After I change it to: named_scope :filtertabs, :join = :student_state, lambda { |*args| {:conditions =

Re: [Rails] Re: pluralization question

2010-01-12 Thread Chris Habgood
Actually the X work/works is the text coming from the pluralization helper. On Tue, Jan 12, 2010 at 10:46 AM, Marnen Laibow-Koser li...@ruby-forum.comwrote: Chris Habgood wrote: Talking more like You have X work/works that (have/has) been created Sure, just test the value of X. If you're

[Rails] Re: Re: Weird POST/PUT behavior

2010-01-12 Thread Marnen Laibow-Koser
Curtis Cooley wrote: On Mon, Jan 11, 2010 at 9:57 PM, Ritchie ritch...@gmail.com wrote: GET and should display a form. It shouldn't be updating anything. This guide should set you on the right track: http://guides.rubyonrails.org/getting_started.html Ok, so the recipe allows you to

[Rails] Re: script/generate not working ! while rails do

2010-01-12 Thread Me
What does the environment.rb show as the rails version? On Jan 12, 10:40 am, Boris Bob li...@ruby-forum.com wrote: Hi Strange thing happens when i run rails project it makes project but when i run script/generate or script/server it writes Missing the Rails 2.3.5 gem. Please `gem install

[Rails] Re: Re: pluralization question

2010-01-12 Thread Marnen Laibow-Koser
Chris Habgood wrote: Actually the X work/works is the text coming from the pluralization helper. ...which you may not want to use if i18n is going to happen. However, you should be able to give the inflector a new special case (if it doesn't already handle this correctly) where 'has' is

[Rails] Using find - beginner's advice

2010-01-12 Thread Steve Castaneda
Owners has_one :widget and Widgets belongs_to :owner. When creating a new widget, I'm giving the option for the user to specify the owner by using a drop down select. The select is populated by pulling a list of owners. What would be the best way to populate the select with owners who do not

[Rails] Re: script/generate not working ! while rails do

2010-01-12 Thread Boris Bob
Chris Habgood wrote: What does the environment.rb show as the rails version? # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION -- Posted via http://www.ruby-forum.com/. -- You received this message because

Re: [Rails] Using find - beginner's advice

2010-01-12 Thread Philip Hallstrom
On Jan 12, 2010, at 9:46 AM, Steve Castaneda wrote: Owners has_one :widget and Widgets belongs_to :owner. When creating a new widget, I'm giving the option for the user to specify the owner by using a drop down select. The select is populated by pulling a list of owners. What would be

[Rails] Re: How to handle Profile Informations with :has_many_throug

2010-01-12 Thread LeonS
So, for example there are profile field for work, main profile fields, contact field (msn, email, adress) and so. So i think there is usage for the user. On 12 Jan., 17:50, Marnen Laibow-Koser li...@ruby-forum.com wrote: LeonS wrote: Thats right, because every User has the same profile

[Rails] How to begin coding with RoR

2010-01-12 Thread Manish Belsare
Hey m doin a project on web application..I need 2 know how to start with the coding using Rails framework? Can anyone provide me with a sample code to accept values from the user in a text field and display the values below the accepted values when he clicks the OK button? -- Posted via

[Rails] Re: How to begin coding with RoR

2010-01-12 Thread Robert Walker
Manish Belsare wrote: Hey m doin a project on web application..I need 2 know how to start with the coding using Rails framework? Can anyone provide me with a sample code to accept values from the user in a text field and display the values below the accepted values when he clicks the OK

[Rails] Re: How to handle Profile Informations with :has_many_throug

2010-01-12 Thread Marnen Laibow-Koser
LeonS wrote: So, for example there are profile field for work, main profile fields, contact field (msn, email, adress) and so These could all be in the User model or, failing that, in a separate Profile model where User has_one :profile. Why do you need Profileship and ProfileGroup? So

[Rails] Re: Using find - beginner's advice

2010-01-12 Thread Marnen Laibow-Koser
Philip Hallstrom wrote: On Jan 12, 2010, at 9:46 AM, Steve Castaneda wrote: I'm assuming my controller would look something like this for Widgets: -- I'm assuming that it has to go in some kind of condition. Am I supposed to run the owners find through some sort of block to validate

[Rails] Re: Using find - beginner's advice

2010-01-12 Thread Steve Castaneda
Marnen Laibow-Koser wrote: The proper SQL query would be SELECT * from owners o left join widgets w on (w.owner_id = o.id) WHERE w.id is null Deriving an AR find from that is left as an exercise. :) Thanks for the homework! I'll get to work on that. -- Posted via

[Rails] Re: Keep getting syntax error

2010-01-12 Thread John Merlino
Frederick Cheung wrote: On Jan 12, 4:58 pm, John Merlino li...@ruby-forum.com wrote: Your lambda should return a single hash with all the query options you want. (and its :joins not :join) Fred Isn't it returning a single hash here? No it isn't - you've got the :join = :student_state

[Rails] Re: Render view outside of a controller/view

2010-01-12 Thread jeff_wigal
Thanks for the advice... I think I am going to pull this out of the model and make it a controller method (/help/reindex) since that will give me easier access to the stuff I need. On Jan 11, 11:37 pm, pharrington xenogene...@gmail.com wrote: On Jan 11, 10:31 pm, jeff_wigal

[Rails] Re: Keep getting syntax error

2010-01-12 Thread John Merlino
John Merlino wrote: Frederick Cheung wrote: On Jan 12, 4:58 pm, John Merlino li...@ruby-forum.com wrote: Your lambda should return a single hash with all the query options you want. (and its :joins not :join) Fred Isn't it returning a single hash here? No it isn't - you've got the

[Rails] Need help reading a yaml file on upload with form

2010-01-12 Thread Alpha Blue
Here is the current basic information: # new (views/file_uploads/new.html.erb) % form_for( @file_upload, :html = { :multipart = true } ) do |f| % %= f.error_messages -% p %= f.label :upload, 'File' -% %= f.file_field :upload -% /p p%= f.submit( 'Upload' ) %/p % end % #

[Rails] Re: Need help reading a yaml file on upload with form

2010-01-12 Thread Alpha Blue
For instructional use here is what I see: 1. Admin user goes to form. 2. Admin user selects browse and finds the yaml file. 3. Admin users selects upload. 4. yaml file is read and parsed. 5. model saves the information from the yaml file into a record. 6. uploading begins in another routine

[Rails] Re: Need help reading a yaml file on upload with form

2010-01-12 Thread pharrington
On Jan 12, 1:47 pm, Alpha Blue li...@ruby-forum.com wrote: Here is the current basic information: # new (views/file_uploads/new.html.erb) % form_for( @file_upload, :html = { :multipart = true } ) do |f| %   %= f.error_messages -%   p     %= f.label :upload, 'File' -%     %= f.file_field

[Rails] NOOB Question on Instance Variable

2010-01-12 Thread BlueHandTalking
I have a class photo. It belongs_to a project. In my ProjectsController I am creating 2 instance variables: @displayphoto = Photo.find_by_project_id(params[:id]) ...and also @photo = @project.build_photo The @displayphoto instance returns a nil object. However, @photo =

[Rails] Re: Polymorphic URL's and Uncountable Resources

2010-01-12 Thread Michael Rigart
Brendon Muir wrote: Hi everyone, I've noticed an inconsistency in the way rails deals with uncountable resources and restful routes. Basically if you map an uncountable resource rails will append '_index' to the end of some routes to avoid route clashes between the routes that deal with

Re: [Rails] How to begin coding with RoR

2010-01-12 Thread Steve Klabnik
There's a new book that's currently a work in progress, but the first few chapters are excellent! You can read it online here: http://railstutorial.org On Tue, Jan 12, 2010 at 6:13 PM, Manish Belsare li...@ruby-forum.comwrote: Hey m doin a project on web application..I need 2 know how to start

[Rails] Rails V 2.3.5 aThe applicaiotn has failed to stMnd MySql 5.1

2010-01-12 Thread Vishwa Rao
I have isntalled Ruby on Rails v 2.3.5 and mySQL windows Developer Edition 5.1 I did gem install mysql. Then when I say: rake db:create:all I get the error: -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] plugin for finding duplicates

2010-01-12 Thread tom
hi is there a plugin or something else which could assist in finding duplicates in a model / table? even with validations, users tend to enter data twice / wrong (for whatever reasons...)..so i was wondering if there is something out there to find these entries, preferably across multiple

[Rails] Re: How to handle Profile Informations with :has_many_throug

2010-01-12 Thread LeonS
Let me explain Why i Write the Models: i'm Coming from Database Development, so normalization is very Important for me. If i create just a Profile Model and put all possible profile Fields into that, than there is no normalization Should i avoid the normalization in Case of RoR and keep the Models

[Rails] Re: NOOB Question on Instance Variable

2010-01-12 Thread Robert Walker
Jet Thompson wrote: I have a class photo. It belongs_to a project. In my ProjectsController I am creating 2 instance variables: @displayphoto = Photo.find_by_project_id(params[:id]) ...and also @photo = @project.build_photo The @displayphoto instance returns a nil object.

[Rails] Mysql 5.1 and Rails 2.3.5 error on Windows

2010-01-12 Thread Vishwa Rao
I installed Rails 2.3.5. Installed mysql 5.1 developer version. Then I did gem install mysql. I did myapp -d mysql I did rake db:create:all Get error The application has failed to start because LIBMYSQL.dll was not found. Reinstlling the application may fix this problem. I completely removed

[Rails] Re: Rails V 2.3.5 aThe applicaiotn has failed to stMnd MySql 5.1

2010-01-12 Thread Vishwa Rao
Vishwa Rao wrote: I have isntalled Ruby on Rails v 2.3.5 and mySQL windows Developer Edition 5.1 I did gem install mysql. Then when I say: rake db:create:all I get the error: bad message please ignore -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

Re: [Rails] Re: Using find - beginner's advice

2010-01-12 Thread Philip Hallstrom
Philip Hallstrom wrote: @owners = Owner.all(:conditions = 'widget_id IS NULL') Would do it. Assuming that it's correct to say that if widget_id is null they have no widget -- this wouldn't catch instances where say an owner *had* widget, the widget was removed and the owners widget_id

[Rails] Re: How to handle Profile Informations with :has_many_throug

2010-01-12 Thread Marnen Laibow-Koser
LeonS wrote: Let me explain Why i Write the Models: i'm Coming from Database Development, so normalization is very Important for me. To me too. If i create just a Profile Model and put all possible profile Fields into that, than there is no normalization Of course there is. Won't every

[Rails] Re: Need help reading a yaml file on upload with form

2010-01-12 Thread Alpha Blue
pharrington wrote: Are you looking for local_path? As in YAML.load_file params[:file_upload][:upload].local_path ? Thanks mate - yes this is exactly what I was looking for. I have not done a lot of work with reading files and am becoming familiar with how to do certain things with them.

Re: [Rails] Re: NOOB Question on Instance Variable

2010-01-12 Thread Colin Law
2010/1/12 Robert Walker li...@ruby-forum.com: Jet Thompson wrote: I have a class photo. It belongs_to a project. In my ProjectsController I am creating 2 instance variables: @displayphoto = Photo.find_by_project_id(params[:id]) ...and also @photo = @project.build_photo The

[Rails] Re: Change default method mappings?

2010-01-12 Thread CoolAJ86
Currently these mappings are established somewhere, but I haven't found it :get = 'index', 'show' :post = 'create' :delete = 'destroy' :put = 'edit' In particular I want to add :options = 'options' No you don't.  You probably want :get = 'options'. Ah, but, I do! Here and in

Re: [Rails] Re: script/generate not working ! while rails do

2010-01-12 Thread Rodrigo Dellacqua
This happened to me yesterday too. Weird, did you install any gems before that? I had a couple gems installed I think that something broke up that =/ []'s Rodrigo Dellacqua On Tue, Jan 12, 2010 at 2:52 PM, Boris Bob li...@ruby-forum.com wrote: Chris Habgood wrote: What does the

[Rails] Re: updating user status

2010-01-12 Thread Andrew Pace
I recommend keeping the table. Let me explain why and try to explain how to set it up better. This type of information is known at the outset of the application and it sounds like it is unlikely to change significantly over time. As such it could be pulled into a domain table, similar to states

Re: [Rails] script/generate not working ! while rails do

2010-01-12 Thread Colin Law
2010/1/12 Boris Bob li...@ruby-forum.com: Hi Strange thing happens when i run rails project it makes project but when i run script/generate or script/server it writes Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update your RAILS_GEM_VERSION setting in

[Rails] Multiple validations on a field... grouping them? only one?

2010-01-12 Thread Danimal
Hello! Has anyone come across a nice, elegant way to handle multiple validation failures on a single field? For example... in the typical login, you might have an email field that has three validations: not blank, less than a max length and matches a format regex. But if I submit the login/signup

[Rails] Re: Multiple validations on a field... grouping them? only o

2010-01-12 Thread Marnen Laibow-Koser
Danimal wrote: Hello! Has anyone come across a nice, elegant way to handle multiple validation failures on a single field? For example... in the typical login, you might have an email field that has three validations: not blank, less than a max length and matches a format regex. But if I

[Rails] Suggestion for Ajax-Framework, for RoR

2010-01-12 Thread sushi 2k
Hello, I have build a table called Project, in RoR with Nested Sets (this means the table has a parent_id, lft and rgt). This table has now several records of projects, that I have inserted via the console, and with the methods provided by the plugin acts_as_netsed_set. What I wanna do now is, to

[Rails] Re: Suggestion for Ajax-Framework, for RoR

2010-01-12 Thread Marnen Laibow-Koser
sushi 2k wrote: Hello, I have build a table called Project, in RoR with Nested Sets (this means the table has a parent_id, lft and rgt). This table has now several records of projects, that I have inserted via the console, and with the methods provided by the plugin acts_as_netsed_set. What

[Rails] validates_captcha not generating a captcha

2010-01-12 Thread Ralph Shnelvar
Newbie here. This is not a question but a report on a work-around for a problem I detected with the gem validates_captcha. My environment is Windows, Vista, Rails Rails 2.3.5 Ruby 1.8.6 gem 1.3.5 validates_captcha-0.9.6 The problem: validates_captcha is generating a default gif with the word

[Rails] validates_inclusion_of on boolean within file fails

2010-01-12 Thread Alpha Blue
Well I'm making a lot of headway with reading an uploaded yml file that contains values that are read and then inserted into the model. The formatted .yml file now looks like this: theme: name: My Theme author: John Doe date: 2010-01-01 stylesheets: true javascripts: false layouts:

[Rails] Re: action mailer

2010-01-12 Thread dan
im having similar issues i see message in terminal window, but no email is there another log file or error to look for? ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.default_content_type = text/html ActionMailer::Base.smtp_settings = { :address = smtp.gmail.com, :port =

[Rails] Re: Using find - beginner's advice

2010-01-12 Thread Steve Castaneda
Steve Castaneda wrote: Thanks for the homework! I'll get to work on that. Finally got it to work! Here's what I ended up with: -- @owners = Owner.find_by_sql(SELECT * FROM Owners LEFT JOIN Widgets ON (Widgets.owner_id =

[Rails] Re: Using find - beginner's advice

2010-01-12 Thread Steve Castaneda
Wow. I just stumbled, (after I figured out what AR meant - sorry!) that I could use :include inside of my find_by... Rails surprises me everyday - I'm loving it. Thanks for the guidance. I'm still trying to figure out who to put it to use. I'm assuming I'll have to pass in an :include and a

[Rails] Re: Suggestion for Ajax-Framework, for RoR

2010-01-12 Thread sushi 2k
Marnen Laibow-Koser wrote: sushi 2k wrote: Hello, I have build a table called Project, in RoR with Nested Sets (this means the table has a parent_id, lft and rgt). This table has now several records of projects, that I have inserted via the console, and with the methods provided by the

[Rails] Re: Using find - beginner's advice

2010-01-12 Thread Steve Castaneda
Steve Castaneda wrote: Wow. I just stumbled, (after I figured out what AR meant - sorry!) that I could use :include inside of my find_by... Rails surprises me everyday - I'm loving it. Thanks for the guidance. I'm still trying to figure out who to put it to use. I'm assuming I'll have

Re: [Rails] Re: action mailer

2010-01-12 Thread Curtis Cooley
On Tue, Jan 12, 2010 at 4:55 PM, dan mr.dan.ma...@gmail.com wrote: im having similar issues i see message in terminal window, but no email is there another log file or error to look for? ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.default_content_type = text/html

[Rails] Re: Install RoR on Vista problem

2010-01-12 Thread rpd
Hi Well sadly I had no reply to my original post for help about my RoR being rubyOFFrails so I am replying now to my own post to update it. I have now found a solution - I was using Ruby19 and windows vista baulked at this (at one stage saying it could not find mscrvtruby18.dll (?)). So I looked

Re: [Rails] Mysql 5.1 and Rails 2.3.5 error on Windows

2010-01-12 Thread Daniel Shimoyama
you must created a set PATH in your enviromnent variable and point it to your mysql bin path. 2010/1/12 Vishwa Rao li...@ruby-forum.com I installed Rails 2.3.5. Installed mysql 5.1 developer version. Then I did gem install mysql. I did myapp -d mysql I did rake db:create:all Get error The

[Rails] Re: updating user status

2010-01-12 Thread Tom Mac
Hi Thanks for all your help Tom -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send

[Rails] hash_for_*_path and hash_for_*_url arguments

2010-01-12 Thread Nathan Beyer
I've been looking for some documentation on the hash_for_* helper methods that are generated from the resource routing, but can't find much. What are the expected parameters, etc? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

[Rails] Re: How to begin coding with RoR

2010-01-12 Thread Rails List
Manish Belsare wrote: Hey m doin a project on web application..I need 2 know how to start with the coding using Rails framework? Can anyone provide me with a sample code to accept values from the user in a text field and display the values below the accepted values when he clicks the OK

[Rails] Re: How to begin coding with RoR

2010-01-12 Thread Rails List
Rails List wrote: Manish Belsare wrote: Hey m doin a project on web application..I need 2 know how to start with the coding using Rails framework? Can anyone provide me with a sample code to accept values from the user in a text field and display the values below the accepted values when he

[Rails] Re: How to begin with developing of a web application using Ruby on Rails

2010-01-12 Thread Rails List
manish belsare wrote: hey i want to do a web application project using RoR and MySQL... can u guide me how to begin with the proj...? I hav done basic applications mentioned on technetra.com. I juzz need ur help nw relating to how to begin with project using Rails Framework.. Waiting for

[Rails] Re: wwwwwwwwwwwwwwwwwwww

2010-01-12 Thread cpr
Dang cat laid on the keyboard - again. On Jan 12, 7:26 am, r...@agileconsultingllc.com wrote: ww -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com.

[Rails] User a owns resource x; don't let user b see user a's resources...

2010-01-12 Thread eggie5
I have a system of users who have many resources. For example a user many have many books, many friends, many items, etc. I have an authentication system in which users can login working just fine (authlogic). However, I have some default scaffold type pages for index. You can view a list of Users

[Rails] captcha

2010-01-12 Thread Tom Mac
Hi I have to use captcha in my rails application (For example at time of register a user) Could anyone please suggest the best and easy to use captcha gem or plugin in rails. Rails version is 2.3.5 Thanks Tom -- Posted via http://www.ruby-forum.com/. -- You received this message because

  1   2   >