Re: [Rails] Wizard form with different models

2011-07-12 Thread Chirag Singhal
You may also want to check out ruby toolbox, it's a good index for different ruby libraries. - http://ruby-toolbox.com/categories/rails_wizards.html Chirag http://sumeruonrails.com On Tue, Jul 12, 2011 at 8:58 PM, Colin Law wrote: > On 12 July 2011 16:20, Rodrigo Ruiz wrote: > > Hi, I alread

Re: [Rails] Unable to install Rmagick + rails 2.3.9 + ruby 1.8.7 + windows Xp + bundler

2011-07-12 Thread Chirag Singhal
Try one of these links: http://stackoverflow.com/questions/6473853/ruby-on-rails-rmagick-on-windows-7/6477787#6477787 https://github.com/oneclick/rubyinstaller/wiki/Tutorials http://phosphor-escence.blogspot.com/2010/10/install-rmagick-on-mingw-and-msys.html http://www.waydotnet.com/blog/2010/02/r

Re: [Rails] different code for each record, how to implement??

2011-07-12 Thread Conrad Taylor
On Tue, Jul 12, 2011 at 9:46 AM, Ramon Leon wrote: > On 07/12/2011 08:42 AM, Conrad Taylor wrote: > >> The above class can be refactored as to the following: >> >> class SiteFactory >> def self.create( site ) >> site.new >> end >> end >> > > I'm just curious, what exactly is the point of t

Re: [Rails] RoR programmer position open in NYC

2011-07-12 Thread Manivannan Sivaprakasam
Hi, I am Manivannan from chennai, India. I have been working in ruby on rails for the past 3 years. I am very much interested in working rails. I am looking for a good job in abroad. I will attach my profile for your reference. If you are interested, Please feel free to contact me. Regards, M

[Rails] Re: testing foreign key of rails fail

2011-07-12 Thread Yennie
On Jul 12, 4:04 pm, Colin Law wrote: > On 12 July 2011 19:22, Yennie wrote: > > > > > > > > > > > I have a some warnings about the referencing offoreignkey, > > i did try several way to solve this problem but i am still stuck with > >foreignkey. > > is the syntax of settingforeignkeyis wrong? >

Re: [Rails] Dynamic Select Menus

2011-07-12 Thread Jim Tobin
Hey Rodrigo, Have you looked inside db/seeds.rb? That file demonstrates seeding a City model. Other things you can do, depending on what you need the data to look like are simple things like: states = %w[Alabama Alaska Arkansas] I also think Ryan did a railscast on models that don't exist in

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Rodrigo Ruiz
I did it =), thank you everyone, the problem was that I was writing: <% f.fields_for :company_contact do |company_contact_form| %> instead of: <%= f.fields_for :company_contact do |company_contact_form| %> Thank you very much, Now I just need help to make this into a multi step form. If anyone hav

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Rodrigo Ruiz
http://apidock.com/rails/ActionView/Helpers/FormHelper/fields_for That explains exactly what I did, the one-to-one part, and still nothing -- 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

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Colin Law
On 12 July 2011 21:47, Rodrigo Ruiz wrote: > views/companies: > <% f.fields_for :company_contact do |company_contact_form| %> >   >    <%= company_contact_form.label 'Name of the responsible for marketing' %> >    <%= company_contact_form.text_field :marketing_name %> >   > <% end %> > CompaniesCo

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Rodrigo Ruiz
BTW, sorry for top posting again =/. I just remembered when I had already sent that last email -- 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 thi

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Rodrigo Ruiz
views/companies: <% f.fields_for :company_contact do |company_contact_form| %> <%= company_contact_form.label 'Name of the responsible for marketing' %> <%= company_contact_form.text_field :marketing_name %> <% end %> CompaniesController: def new @company = Company.new @compa

Re: [Rails] Date Parsing Puzzlement

2011-07-12 Thread Colin Law
On 12 July 2011 20:58, Colin Law wrote: > On 12 July 2011 19:13, Leigh Daniels wrote: >> Hi Colin, Sayuj and Michael, >> >> This is a proprietary, in-house app in Rails 3.1rc4 for the U.S market and >> they hate date_select ("Date is a little hard to fill out. It is >> time-consuming to click o

Re(2): [Rails] Date Parsing Puzzlement

2011-07-12 Thread Leigh Daniels
On Tue, Jul 12, 2011, Colin Law wrote: >On 12 July 2011 19:13, Leigh Daniels wrote: >> Hi Colin, Sayuj and Michael, >> >> This is a proprietary, in-house app in Rails 3.1rc4 for the U.S market >and they hate date_select ("Date is a little hard to fill out. It is >time-consuming to click on "Janu

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Colin Law
On 12 July 2011 16:32, Rodrigo Ruiz wrote: > And no, it doesn't work =/ It is no good just saying it doesn't work, what hope has anyone here got of helping further if that is all the information you give? Show us the modified code and the new error message you are getting. Colin -- You receiv

Re: [Rails] testing foreign key of rails fail

2011-07-12 Thread Colin Law
On 12 July 2011 19:22, Yennie wrote: > I have a some warnings about the referencing of foreign key, > i did try several way to solve this problem but i am still stuck with > foreign key. > is the syntax of setting foreign key is wrong? > > can anyone help to fix the problem > > > ~user table > id

Re: [Rails] Date Parsing Puzzlement

2011-07-12 Thread Colin Law
On 12 July 2011 19:13, Leigh Daniels wrote: > Hi Colin, Sayuj and Michael, > > This is a proprietary, in-house app in Rails 3.1rc4 for the U.S market and > they hate date_select ("Date is a little hard to fill out. It is > time-consuming to click on "January" and scroll to "June", etc. Any chanc

[Rails] Dynamic Select Menus

2011-07-12 Thread Rodrigo Ruiz
I watched the railscast episode 88: http://railscasts.com/episodes/88-dynamic-select-menus?autoplay=true Only problem is that it uses a State and Country model that are not shown. Can anyone help me with this? I mean, how am I supposed to do this, should i manually populate the database at the cons

Re: [Rails] Re: has_many and belongs_to association

2011-07-12 Thread Colin Law
On 11 July 2011 17:59, Yennie wrote: > > > On Jul 11, 12:13 pm, Colin Law wrote: >> On 11 July 2011 17:05, Yennie wrote: > >> > Hi , >> >> > I want to test the one below but I got the problem >> >> >  belongs_to :name, :class_name => "Phrase", :foreign_key => "name" >> >> > in my test >> > conte

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Colin Law
On 12 July 2011 16:31, Rodrigo Ruiz wrote: > Sorry, I don't know exactly what top posting is, but I'm replying the last > email always, if that's what you mean Top posting is putting your reply above the previous message, as you have done, as opposed to inserting your reply at appropriate points

[Rails] Aw: Re: Using Capybara to select from a collection_select call (select tag)

2011-07-12 Thread jrw
The error message is "no select box ... with label 'Organization' found". Your label exists, but it is not connected to the select field. It should be If you're using it in some kind of form_for(@restaurant) - helper you'd simply have to use form.label :organization_id. -- You received this me

[Rails] Is this a bug in Rack?

2011-07-12 Thread johnny
I'm trying to post multipart content (a file and some strings) to a Sinatra server on localhost using a java client. It seems the server doesn't like the POST message. The stack trace is: ERROR NoMethodError: unde

[Rails] Re: Command line can't find sqlite3

2011-07-12 Thread Barney
Answering my own question now, I followed your link and it said to use "sqlite3.exe" in the call so I tried it but it still didn't work. Then I searched for sqlite3.exe and found one in a Java directory. Putting its location in the path didn't help. When I copied that exe to the \db\ directory and

[Rails] testing foreign key of rails fail

2011-07-12 Thread Yennie
I have a some warnings about the referencing of foreign key, i did try several way to solve this problem but i am still stuck with foreign key. is the syntax of setting foreign key is wrong? can anyone help to fix the problem ~user table id name address guest ~ prescription table id person (in

Re: [Rails] Date Parsing Puzzlement

2011-07-12 Thread Leigh Daniels
Hi Colin, Sayuj and Michael, This is a proprietary, in-house app in Rails 3.1rc4 for the U.S market and they hate date_select ("Date is a little hard to fill out. It is time-consuming to click on "January" and scroll to "June", etc. Any chance I could type in 6/3/11?"). >If you want to allow t

[Rails] Re: Command line can't find sqlite3

2011-07-12 Thread Barney
Thanks, Rodrigo, but I put the \db\ directory into the Path and tried the call in both the Ruby command line and a regular command line from that directory where I have development.sqlite3, trying both "sqlite" and "sqlite3" as the call at the beginning of the line, but I get the same error that th

[Rails] Re: Command line can't find sqlite3

2011-07-12 Thread Rodrigo
Barney, I think you have to enter the sqlite shell if you want to run those types of commands (e.g., select * etc...). Run sqlite on the "development" db, try this: $ cd [app_name] $ cd db/# your development.sqlite3 file should be here... $ sqlite development.sqlite3 # now the sqlite shell

[Rails] Re: has_many and belongs_to association

2011-07-12 Thread Yennie
On Jul 11, 2:59 pm, Frederick Cheung wrote: > On 11 Jul 2011, at 17:59, Yennie wrote: > > > > > > > > > > > > > On Jul 11, 12:13 pm, Colin Law wrote: > >> On 11 July 2011 17:05, Yennie wrote: > > >>> Hi , > > >>> I want to test the one below but I got the problem > > >>>  belongs_to:name, :cl

[Rails] Command line can't find sqlite3

2011-07-12 Thread Barney
Hello, I'm using the newest "Agile Web Development With Rails" book and the Ruby command line call near the end of p. 267 is: sqlite3 -line db/development.sqlite3 "select * from orders limit 1" and this, (with my own table, which has data which was verified by looking at the WEBRick output in

Re: [Rails] different code for each record, how to implement??

2011-07-12 Thread Ramon Leon
On 07/12/2011 08:42 AM, Conrad Taylor wrote: The above class can be refactored as to the following: class SiteFactory def self.create( site ) site.new end end I'm just curious, what exactly is the point of this class? Now, we can rewrite our calling routine to the following: [ He

Re: [Rails] different code for each record, how to implement??

2011-07-12 Thread Conrad Taylor
On Tue, Jul 12, 2011 at 8:33 AM, Conrad Taylor wrote: > On Tue, Jul 12, 2011 at 2:02 AM, aupayo wrote: > >> Hi, >> >> I want to screen scrape information from some websites (I have >> permission to do it). >> >> I am using the Mechanize plugin. The websites are different from each >> other, so I

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Angel Robert Marquez
save each page form values as session variables and only perform the insert to multiple tables on the final page, right? On Tue, Jul 12, 2011 at 8:32 AM, Rodrigo Ruiz wrote: > And no, it doesn't work =/ > > > On Tue, Jul 12, 2011 at 12:15 PM, Colin Law wrote: > >> On 12 July 2011 15:54, Rodrigo R

Re: [Rails] different code for each record, how to implement??

2011-07-12 Thread Conrad Taylor
On Tue, Jul 12, 2011 at 2:02 AM, aupayo wrote: > Hi, > > I want to screen scrape information from some websites (I have > permission to do it). > > I am using the Mechanize plugin. The websites are different from each > other, so I need to write a different RoR code to screen scrape each > websit

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Rodrigo Ruiz
And no, it doesn't work =/ On Tue, Jul 12, 2011 at 12:15 PM, Colin Law wrote: > On 12 July 2011 15:54, Rodrigo Ruiz wrote: > > Could you not top post please, it makes it difficult to follow the > thread. Insert your comments at appropriate points in previous > message. Thanks. > > > If I do t

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Rodrigo Ruiz
Sorry, I don't know exactly what top posting is, but I'm replying the last email always, if that's what you mean On Tue, Jul 12, 2011 at 12:15 PM, Colin Law wrote: > On 12 July 2011 15:54, Rodrigo Ruiz wrote: > > Could you not top post please, it makes it difficult to follow the > thread. Inse

Re: [Rails] Wizard form with different models

2011-07-12 Thread Colin Law
On 12 July 2011 16:20, Rodrigo Ruiz wrote: > Hi, I already started this question in another email, but the subject was > wrong and I'd like to specify better what I want. > I want a wizard form > like http://railscasts.com/episodes/217-multistep-forms?view=similar , but > with a progress bar > and

[Rails] Wizard form with different models

2011-07-12 Thread Rodrigo Ruiz
Hi, I already started this question in another email, but the subject was wrong and I'd like to specify better what I want. I want a wizard form like http://railscasts.com/episodes/217-multistep-forms?view=similar , but with a progress bar and each step will be a different model, something like ht

Re: [Rails] Need Ruby on Rails Developer

2011-07-12 Thread Peter Hickman
They are a recruitment company so it's a miracle they are only incompetent. This assumes that they haven't missed out any important details like where in California, you know that it is bigger than some countries. So is it nearer Crescent City or El Cajon? On 12 July 2011 14:54, Peter Bell wrote:

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Colin Law
On 12 July 2011 15:54, Rodrigo Ruiz wrote: Could you not top post please, it makes it difficult to follow the thread. Insert your comments at appropriate points in previous message. Thanks. > If I do the same as the 196 episode it works, but I want a has_one and > belongs_to relationship, no h

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Rodrigo Ruiz
If I do the same as the 196 episode it works, but I want a has_one and belongs_to relationship, no has_many. With has_one it doesn't work. If I set all to singular form (the names of model I mean) I get this error: NoMethodError in CompaniesController#new undefined method `build' for nil:NilClass

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Colin Law
On 12 July 2011 15:32, Rodrigo Ruiz wrote: > Actually what I'm looking for is a mix of the multistep form of 217 episode, > with a different (and related) model (like 192) for each step, and want them > to be saved at same time. I have not looked at that episode (217) recently, but I believe it i

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Rodrigo Ruiz
Actually what I'm looking for is a mix of the multistep form of 217 episode, with a different (and related) model (like 192) for each step, and want them to be saved at same time. On Tue, Jul 12, 2011 at 9:22 AM, Everaldo Gomes wrote: > I don't know if this is because Ryan Bates used nifty-gener

[Rails] Unable to install Rmagick + rails 2.3.9 + ruby 1.8.7 + windows Xp + bundler

2011-07-12 Thread Mukesh Singh
My gemfile source 'http://rubygems.org' source 'http://gems.github.com' gem "rails", "=2.3.8" gem "mogli" gem "geokit" gem "thinking-sphinx", "=1.3.18", :require => 'thinking_sphinx' gem "ts-delayed-delta", "=1.1.0", :require => 'thinking_sphinx' gem "mysql" gem "rmagick", "=2.6.0", :require => 'R

Re: [Rails] Need Ruby on Rails Developer

2011-07-12 Thread Peter Bell
I take it that neither consistent capitalization nor the ability to spell the names of key libraries accurately is a relevant part of the job description? On Jul 11, 2011, at 1:56 PM, karthikey...@hrgiants.com wrote: > Hi, > > We have URGENT requirement for an Ruby on Rails Developer in CA. Pl

Re: [Rails] different code for each record, how to implement??

2011-07-12 Thread Colin Law
On 12 July 2011 10:02, aupayo wrote: > Hi, > > I want to screen scrape information from some websites (I have > permission to do it). > > I am using the Mechanize plugin. The websites are different from each > other, so I need to write a different RoR code to screen scrape each > website. There wo

[Rails] Re: different code for each record, how to implement??

2011-07-12 Thread PsiPro
Here are my, off the top of my head suggestions: Different thor scripts for each website, perhaps a single script to call the rest of them. I did something similar for scraping shopping cart information. Since I needed the same data on every page I wrote a generic crawler which would read the XPa

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Colin Law
On 12 July 2011 05:13, Rodrigo Ruiz wrote: > It uses a method called 'build', which says (to me at least) that it doesn't > exist. Show us the exact error and the code around the failing line. Colin > > On Mon, Jul 11, 2011 at 10:15 PM, Everaldo Gomes > wrote: >> >> Take a look in these screen

Re: [Rails] Re: Help filling out a registration (I think it's called multi tenant)

2011-07-12 Thread Everaldo Gomes
I don't know if this is because Ryan Bates used nifty-generators to scaffold Try to follow the tutorial step by step, or download the source code of the episode. Best Regards, Everaldo On Tue, Jul 12, 2011 at 1:13 AM, Rodrigo Ruiz wrote: > It uses a method called 'build', which says (to m

[Rails] mixins with an AR class not working, why?

2011-07-12 Thread Lille
Hi all, I have two modules with validations in them. For example, module FinancialData def self.included(base) base.validates_numericality_of :gross_income end end I mix in modules like FinancialData to AR classes, and it works fine. (When I test FinancialData behavior I do it in a table

Re: [Rails] Date Parsing Puzzlement

2011-07-12 Thread Sayuj Othayoth
Hi Leigh, It seems it takes the input as DD/MM/ by default. that you need to change to your convenient format. Or ask the user to input the date in DD/MM/ format which is default/current. On Tue, Jul 12, 2011 at 4:15 PM, Leigh Daniels wrote: > Do you mean the user should type it in as MM/

Re: [Rails] Date Parsing Puzzlement

2011-07-12 Thread Leigh Daniels
Do you mean the user should type it in as MM/DD/ or that there is a setting somewhere that I should change? **Leigh >your input format is DD/MM/. change this to MM/DD/. > >On Tue, Jul 12, 2011 at 6:45 AM, Leigh Daniels >wrote: > >> Hi All, >> >> When I enter a Start Date in the text

[Rails] How to write render expectation in Controller Spec?

2011-07-12 Thread Chandu80
Hello All, I am a rspec beginner and I am trying to find a way out to write render expectation in controller spec.I used the following ways render '/channels/createchannel.html.erb' view.should_receive(:render).with(:action => "createchannel") ChannelsController.expect_render(:action => "createchan

[Rails] different code for each record, how to implement??

2011-07-12 Thread aupayo
Hi, I want to screen scrape information from some websites (I have permission to do it). I am using the Mechanize plugin. The websites are different from each other, so I need to write a different RoR code to screen scrape each website. There would be hundreds of different websites. Ok, the prob

Re: [Rails] Date Parsing Puzzlement

2011-07-12 Thread Colin Law
On 12 July 2011 02:15, Leigh Daniels wrote: > Hi All, > > When I enter a Start Date in the text field as "07/11/2011" it gets stored in > the database as "2011-11-07" instead of "2011-07-11". > > This change happens before the column is available in the controller. Is > there some Rails setting

Re: [Rails] Date Parsing Puzzlement

2011-07-12 Thread Michael Pavling
On 12 July 2011 07:11, Sayuj Othayoth wrote: > On Tue, Jul 12, 2011 at 6:45 AM, Leigh Daniels > wrote: >> When I enter a Start Date in the text field as "07/11/2011" it gets stored >> in the database as "2011-11-07" instead of "2011-07-11". > > your input format is DD/MM/. change this to MM/D

[Rails] Re: Rails 3 where query for nested attributes

2011-07-12 Thread Sebastian
Thank you so much, it's working great! I also found that in the official Rails 3 guides, but I didn't know that I have to look for the join method. Now I am using the following code, just for case that anybody else has the same issue: class Project < ActiveRecord::Base has_many :tasks valida