[Rails] (Jobs) ShoeDazzle is hiring! Sr Ruby on Rails Developer- Santa Monica, CA

2010-11-16 Thread Noya- ShoeDazzle
Hey Everyone, My name is Noya and I am a corporate recruiter with Shoedazzle. We're an e-commerce retail company, founded in 2009, that is the market leader in the specialized shoes and accessories domain. We are based out of Santa Monica, CA and are currently experiencing a phase of tremendous

[Rails] Re: Javascript refresh...?

2010-11-16 Thread Xuan
If you are using rails 2 you may want to check examples for 'observe_field' and 'observe_form' helpers; they'll use ajax to update your page without reloading it. If you are using rails 3 you'll have to find their new counterparts, as these 2 are deprecated. Unfortunately I can't give more info

Re: [Rails] Re: model relationship fails?

2010-11-16 Thread Peter De Berdt
On 16 Nov 2010, at 00:58, arga aridarma wrote: Ah, sorry. I wasn't aware that there is already a thread called model relationship fails? before. So, I will restart my question in the new email. Hopefully this time, it does not hijack another thread. You misunderstood. When you press

[Rails] Re: Installing rmagick gem with RVM

2010-11-16 Thread José Mota
Hi Dries, I had the same problem some time ago and needed a solution for myself. Here's the post I followed to successfully install Rmagick: http://teachmetocode.com/articles/installing-rmagick-on-mac-os-x/ Whenever it aborts for missing packages, just install what's left through ports and

[Rails] Re: SQLServer 2008 and Windows XP

2010-11-16 Thread Magnus D.
Fredrik TiC Jansson wrote in post #961665: I had similar problems on windows server 2003 try the steps in the link below and it should work ( i use mongrel as my webserver) http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/90bac21d2f5d2616/908fbcaed47c5259#908fbcaed47c5259

[Rails] foreigner plugin.

2010-11-16 Thread Dani Dani
Hi, Maybe I'm missing/not-understanding here something, but why would I want to use the foreigner plugin if rails supports foreign key ? does the has_many/one and belong_to not enough to take care of all activities related to foreign key e.g. delete from the database all records dependent on the

Re: [Rails] foreigner plugin.

2010-11-16 Thread Colin Law
On 16 November 2010 10:00, Dani Dani li...@ruby-forum.com wrote: Hi, Maybe I'm missing/not-understanding here something, but why would I want to use the foreigner plugin if rails supports foreign key ? does the has_many/one and belong_to not enough to take care of all activities related to

Re: [Rails] Webrick Configuration

2010-11-16 Thread PalaniKannan K
Hi hassan, Your suggestion is valuable. I tried as you told... script #!/bin/bash cd ~/sample rails server /script This script is working if i initiate as /etc/init.d/webrick. But, it doesnt start with system boot. (I provided 777 permission too...), I dont know this will be permission issue

Re: [Rails] Webrick Configuration

2010-11-16 Thread Jan Marquardt
On 11/16/2010 11:23 AM, PalaniKannan K wrote: Hi hassan, Your suggestion is valuable. I tried as you told... script #!/bin/bash cd ~/sample rails server /script This script is working if i initiate as /etc/init.d/webrick. But, it doesnt start with system boot. (I provided 777 permission

Re: [Rails] Webrick Configuration

2010-11-16 Thread PalaniKannan K
Dear Jan, I created symbolic link of /etc/init.d/webrick to /etc/rc2.d/webrick. Still, its same problem. The server is not starting at system boot up. I feel that webrick start during system boot and stoped immediately without keep on running. Any way to keep on running webrick in linux? --

Re: [Rails] Webrick Configuration

2010-11-16 Thread PalaniKannan K
Dear All, I included the /etc/init.d/webrick to System-Preferences-Startup Applications-Add /etc/init.d/webrick. Now its started and keep on running in my Linux. Thanks lot everyone for giving your suggestions. If you have any comment over this answer kindly post. -- With Regards, Palani Kannan.

[Rails] Re: foreigner plugin.

2010-11-16 Thread Dani Dani
Colin Law wrote in post #961785: As the readme for Foreigner at https://github.com/matthuhiggins/foreigner states: Foreigner introduces a few methods to your migrations for adding and removing foreign key constraints. Constraints being a key word here. It is for use in migrations, not in

[Rails] Why is my models can't be related using has_one and belongs_to?

2010-11-16 Thread arga aridarma
Dear all, This is a repost of my question, because the first post is considered as thread hijack. I hope i got this right this time. I have a silly problem in setting up a relationship between 4 models. I set these 4 models, ComUser, DefJabatan, DefUserRole, DefKelamin. In each model with name

[Rails] heroku not working /heroku/commands/pgbackups.rb:9:in `class:Pgbackups': uninitialized constant He

2010-11-16 Thread Karácsony K.
Hi! If i tipe heroku in console i become this: ~onemore~heroku /home/koli/.rvm/gems/ruby-1.9.2...@onemore/gems/heroku-1.13.1/lib/heroku/commands/pgbackups.rb:9:in `class:Pgbackups': uninitialized constant Heroku::Command::Pgbackups::Help (NameError) from

[Rails] how to insert static pages and how to develop a website using ROR?

2010-11-16 Thread venkata reddy
Hi all.. I configured ROR successfully...and i practiced 2-3 sample applications Using ROR like creating a video_jukebox and displaying a list of tickets etc.. but now i want to build a real time project using ROR.That is a site for a hospital and which contains almost all pages. So how to

[Rails] Re: Why is my models can't be related using has_one and belongs_to?

2010-11-16 Thread Tim Shaffer
On Nov 16, 7:17 am, arga aridarma arga_arida...@yahoo.com wrote: Am I missing something here, like violating a naming convention or something? When you specify the association with has_one or belongs_to, you should be using lowercase_underscore instead of CamelCase. For example: has_one

Re: [Rails] how to insert static pages and how to develop a website using ROR?

2010-11-16 Thread mahesh s
Hi create apprpriate controller and action of your static page like if your have controller called home_conntroller the action for index like controller -home action -index so in rails you will get a view foor each action in index file you just paste the welcome page html file on that if ur well

Re: [Rails] Webrick Configuration

2010-11-16 Thread Colin Law
On 16 November 2010 11:37, PalaniKannan K kpalanikan...@gmail.com wrote: Dear All, I included the /etc/init.d/webrick to System-Preferences-Startup Applications-Add /etc/init.d/webrick. Now its started and keep on running in my Linux. Thanks lot everyone for giving your suggestions. If you

Re: [Rails] Re: foreigner plugin.

2010-11-16 Thread Colin Law
On 16 November 2010 11:53, Dani Dani li...@ruby-forum.com wrote: Colin Law wrote in post #961785: As the readme for Foreigner at https://github.com/matthuhiggins/foreigner states: Foreigner introduces a few methods to your migrations for adding and removing foreign key constraints.

Re: [Rails] Re: Why is my models can't be related using has_one and belongs_to?

2010-11-16 Thread arga aridarma
Hello Tim, I have done that, and sadly still got this from the debug: --- !ruby/object:ComUser attributes: def_jabatan_id: 1 created_at: 2010-11-16 04:31:35 def_user_role_id: 1 gsm: - updated_at: 2010-11-16 04:31:35 alamat: - username: admin id: 1 def_kelamin_id: 1

[Rails] Re: Why is my models can't be related using has_one and belongs_to?

2010-11-16 Thread Tim Shaffer
On Nov 16, 7:17 am, arga aridarma arga_arida...@yahoo.com wrote: I'm getting a feeling that I didn't set the relationship right, because i don't see any attributes addition in the ComUser from the model started with Def-something that i create above.. Forgot to add that changing the case on

[Rails] Re: how to insert static pages and how to develop a website using ROR?

2010-11-16 Thread venkata reddy
hi mahesh, Thanks for the quick response.. i tried what u told but the images are not getting displayed.. i seperately designed a home page using html and i pasted the code in the home\index.html (i copied the image to home foleder as well)but the text only itself only displaing and the

Re: [Rails] Re: Why is my models can't be related using has_one and belongs_to?

2010-11-16 Thread arga aridarma
If debug can't be used for checking relationship, how can I check whether the relationship is already up and running? I have tried to_yaml and inspect, but to_yaml (simple_format @users.to_yaml) returns the same thing as debug, @users.inspect returns # I have tried to access the attribute of

Re: [Rails] Webrick Configuration

2010-11-16 Thread PalaniKannan K
Dear Collin, You are exactly correct, I accept. Up to my requirement, startup is enough to initiate webrick. Ofcourse, It needs to be do so, for boot time initiation. -- With Regards, Palani Kannan. K -- You received this message because you are subscribed to the Google Groups Ruby on Rails:

[Rails] Re: foreigner plugin.

2010-11-16 Thread Marnen Laibow-Koser
Dani Dani wrote in post #961839: Marnen Laibow-Koser wrote in post #961826: And you really can't guarantee that in most cases. Therefore, it is absolutely essential to have foreign key constraints in the DB, which is what Foreigner manages for you. what exactly is ment here, where can I

Re: [Rails] Re: Re: Why is my models can't be related using has_one and belongs_to?

2010-11-16 Thread Colin Law
On 16 November 2010 14:59, arga aridarma arga_arida...@yahoo.com wrote: Thanks for the advice. I have tried to check with the reflections, and surely enough the relation is there. So i tried to change the query in the controller to this: @users = ComUser.find(:first, :include

[Rails] Re: using DB2 with Rails 3

2010-11-16 Thread Conor Nugent
pepe wrote in post #961589: This is from 2007 but it might get you started: http://www.ibm.com/developerworks/data/library/techarticle/dm-0705chun/ Thanks Pepe! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

Re: [Rails] Re: how to insert static pages and how to develop a website using ROR?

2010-11-16 Thread mahesh s
Hi venkat I Hope u included all the css and images In Rails app we have a folder called public, Inside public u can see the folders 1)images 2)javascripts 3)stylesheets there u have to paste all the images and css js in their respective folder. then u have to give a image path *img

[Rails] Script working on boot drive, but not external drive with space in the name. Please help!

2010-11-16 Thread yaphi
I have three volumes on my computer all with the same identical copy of this script https://gist.github.com/c8f0ed9961a93c30b7ec /Volumes/Data Drive /Volumes/Boot Drive /Volumes/Drobo on my boot drive, the script works great on my Drobo, the script also works great however on the Data Drive, I

[Rails] Test files downloads with Cucumber

2010-11-16 Thread John Wu
Hi everybody: I'm writing tests for a future application with Cucumber and Capybara and I just want to know if there is anyway to check if the download links and/or the files are OK. An example scenario would be the following one: Scenario: Checking links Given I am logged in as ... When I

[Rails] Re: Test files downloads with Cucumber

2010-11-16 Thread Marnen Laibow-Koser
John Wu wrote in post #961880: Hi everybody: I'm writing tests for a future application with Cucumber and Capybara and I just want to know if there is anyway to check if the download links and/or the files are OK. Why do you want to use Cucumber to test that the files are OK? It seems to

[Rails] rails 3.0.3 and visit_CoercibleString errors

2010-11-16 Thread anywho
From having no errors with 3.0.2 I now see lots of these errors when running my tests. undefined method `visit_CoercibleString' for #Arel::Visitors::MySQL: 0x01074f4298 Anyone know what this is? -- You received this message because you are subscribed to the Google Groups Ruby on Rails:

[Rails] Re: Test files downloads with Cucumber

2010-11-16 Thread John Wu
Marnen Laibow-Koser wrote in post #961883: Why do you want to use Cucumber to test that the files are OK? It seems to me that this is properly done in your model specs, by testing the methods that generate the files. Hi, thank you very much for the answer. Sorry for the explanation, by OK

[Rails] Re: Test files downloads with Cucumber

2010-11-16 Thread Marnen Laibow-Koser
John Wu wrote in post #961887: Marnen Laibow-Koser wrote in post #961883: Why do you want to use Cucumber to test that the files are OK? It seems to me that this is properly done in your model specs, by testing the methods that generate the files. Hi, thank you very much for the answer.

[Rails] Sorting with Associations ??

2010-11-16 Thread andyl
With ActiveRecord, how do I sort results using associations? For example, I have class Roster ActiveRecord # name = text has_many :members end class Member ActiveRecord # zip_code = integer belongs_to :roster end I would like to generate a list of members, grouped by roster name,

[Rails] Re: Test files downloads with Cucumber

2010-11-16 Thread John Wu
At the moment, using the name to check the file is enough. By the way, do you know anyway to check if a sent mail have an attachment using Cucumber? Thanks again -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Sorting with Associations ??

2010-11-16 Thread Tim Shaffer
On Nov 16, 2:27 pm, andyl akl...@gmail.com wrote: Something like this: Member.order(roster.name, zip_code).all But I can't get the syntax quite right - I've played around with join and include - can anyone tell me the right syntax to use?? Remember that table names are plural.

[Rails] Re: Test files downloads with Cucumber

2010-11-16 Thread Marnen Laibow-Koser
John Wu wrote in post #961894: At the moment, using the name to check the file is enough. OK. Then you presumably already know how to do that. By the way, do you know anyway to check if a sent mail have an attachment using Cucumber? Thanks again You're asking the wrong questions, I think.

[Rails] Re: Test files downloads with Cucumber

2010-11-16 Thread John Wu
Marnen Laibow-Koser wrote in post #961899: John Wu wrote in post #961894: At the moment, using the name to check the file is enough. OK. Then you presumably already know how to do that. In fact, that's the main question because I have no idea how to do that. By the way, do you know

[Rails] acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread aperture science
I've tried out 'acts_as_taggable', 'acts_as_taggable_on' and 'acts_as_taggable_on_steroids' and all of them output undefined method 'empty?' with the tag_cloud action. I am following the guides precisely. Yet I can find no references to this error anywhere, so I must be doing something wrong...

[Rails] Re: Script working on boot drive, but not external drive with space in the name. Please help!

2010-11-16 Thread Frederick Cheung
On Nov 16, 5:48 pm, yaphi jconto...@gmail.com wrote: I have three volumes on my computer all with the same identical copy of this scripthttps://gist.github.com/c8f0ed9961a93c30b7ec /Volumes/Data Drive /Volumes/Boot Drive /Volumes/Drobo on my boot drive, the script works great on my

[Rails] Job opening

2010-11-16 Thread sbclick
There is an entrepreneurial job opening in Santa Barbara, CA for individuals who are strong with Ruby on Rails. (You need not be local) If this job description matches your skills set, please submit your cover letter, qualifications and references to j...@sbclick.com. This position has the

[Rails] Re: Test files downloads with Cucumber

2010-11-16 Thread Marnen Laibow-Koser
John Wu wrote in post #961900: Marnen Laibow-Koser wrote in post #961899: John Wu wrote in post #961894: At the moment, using the name to check the file is enough. OK. Then you presumably already know how to do that. In fact, that's the main question because I have no idea how to do that.

[Rails] Re: Sorting with Associations ??

2010-11-16 Thread andyl
That did it ! Thank you very much ! On Nov 16, 11:48 am, Tim Shaffer timshaf...@me.com wrote: On Nov 16, 2:27 pm, andyl akl...@gmail.com wrote: Something like this: Member.order(roster.name, zip_code).all But I can't get the syntax quite right - I've played around with join and

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread Marnen Laibow-Koser
aperture science wrote in post #961901: I've tried out 'acts_as_taggable', 'acts_as_taggable_on' and 'acts_as_taggable_on_steroids' and all of them output undefined method 'empty?' with the tag_cloud action. Then the error is probably not in their code... [...] the error is:

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread aperture science
- tag_cloud @tags, %w(css_class1 css_class2 css_class3 css_class4) do |tag, css_class| = link_to tag.name, { :action = :tag, :id = tag.name }, :class = css_class Is the offending line(s) That is taken directly from the github page (translated into HAML) I assume it is something I am doing

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread aperture science
the documentation is here: https://github.com/mbleigh/acts-as-taggable-on and i do get the same error when I use html.erb syntax instead of haml On Nov 16, 12:32 pm, aperture science mekkagoj...@gmail.com wrote:   - tag_cloud @tags, %w(css_class1 css_class2 css_class3 css_class4) do |tag,

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread Marnen Laibow-Koser
Please quote when replying. aperture science wrote in post #961912: - tag_cloud @tags, %w(css_class1 css_class2 css_class3 css_class4) do |tag, css_class| = link_to tag.name, { :action = :tag, :id = tag.name }, :class = css_class Is the offending line(s) Which? That is taken

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread aperture science
On Nov 16, 12:45 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Which? The first line of the stack trace points to a line in my index which contains the following: - tag_cloud @tags, %w(css_class1 css_class2 css_class3 css_class4) do | tag, css_class| The above line of code is taken

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread aperture science
Amendment: - tag_cloud(@tags, %w(css1 css2 css3 css4)) do |tag, css_class| is the exact line in my view that the stack trace is pointing at -- 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: Script working on boot drive, but not external drive with space in the name. Please help!

2010-11-16 Thread yaphi
Thanks for the response but I tried tacking on an escaped path to the beginning of the path variable and it still gives me the same error. Also notice that my boot drive has a space in it's volume name and the script runs fine. On Nov 16, 3:04 pm, Frederick Cheung frederick.che...@gmail.com

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread Marnen Laibow-Koser
aperture science wrote in post #961920: [...] What is the value of @tags ? As per the documentation, @tags is defined in my controller as: @tags = Blog.tag_counts_on(:tags) I didn't ask that. I asked *what the actual value* was. It seems like it's nil. from the console, the above line

[Rails] Best way to test web services and XMLHttpRequest

2010-11-16 Thread turkan
Hello. How do you test your web services and XHR requests? Like many of us I have `render :xml = @obj` in my controllers. I also have something like `render :json = @obj if xhr?` in my controller. I also use some custom XML serialization in my models by overriding to_json and as_json. How do

[Rails] Re: how to install ror on windows 7

2010-11-16 Thread MarcRic
Marnen wrote: Oh, I know you *can*. I just don't see why it's worth the bother. It is YOUR opinion. I'm really tired of this kind of endless and useless discussions. I only answered a topic named: how to install ror on windows 7, which is MY interest. I'm trying to keep the focus on the

[Rails] Re: how to install ror on windows 7

2010-11-16 Thread Marnen Laibow-Koser
MarcRic wrote in post #961927: Marnen wrote: Oh, I know you *can*. I just don't see why it's worth the bother. It is YOUR opinion. I'm really tired of this kind of endless and useless discussions. Then don't prolong them by responding. Best, -- Marnen Laibow-Koser http://www.marnen.org

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread aperture science
On Nov 16, 1:24 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: I didn't ask that.  I asked *what the actual value* was.  It seems like it's nil. If I understand you correctly, the actual value of @tags as defined by Blog.tag_counts_on(:tags) is: [#ActsAsTaggableOn::Tag id: 2, name: post

[Rails] Re: Best way to test web services and XMLHttpRequest

2010-11-16 Thread Marnen Laibow-Koser
turkan wrote in post #961926: Hello. How do you test your web services and XHR requests? Like many of us I have `render :xml = @obj` in my controllers. I also have something like `render :json = @obj if xhr?` in my controller. I also use some custom XML serialization in my models by

Re: [Rails] Re: how to install ror on windows 7

2010-11-16 Thread Colin Law
On 16 November 2010 21:30, MarcRic marc...@gmail.com wrote: Marnen wrote: Oh, I know you *can*.  I just don't see why it's worth the bother. It is YOUR opinion. I'm really tired of this kind of endless and useless discussions. It is not necessarily useless, it was just such a discussion

Re: [Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread Colin Law
On 16 November 2010 21:35, aperture science mekkagoj...@gmail.com wrote: On Nov 16, 1:24 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: I didn't ask that.  I asked *what the actual value* was.  It seems like it's nil. If I understand you correctly, the actual value of @tags as defined

[Rails] Re: Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread Marnen Laibow-Koser
Colin Law wrote in post #961937: On 16 November 2010 21:35, aperture science mekkagoj...@gmail.com wrote: On Nov 16, 1:24pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: I didn't ask that. I asked *what the actual value* was. It seems like it's nil. If I understand you correctly, the

Re: [Rails] Re: Re: Why is my models can't be related using has_one and belongs_to?

2010-11-16 Thread arga aridarma
Without include, the debug return this: --- !ruby/object:ComUser attributes: def_jabatan_id: 3 created_at: 2010-11-16 04:31:35 def_user_role_id: 1 gsm: - updated_at: 2010-11-16 04:31:35 alamat: - username: admin id: 1 def_kelamin_id: 1 password: admin online_status: 2

[Rails] Re: Best way to test web services and XMLHttpRequest

2010-11-16 Thread turkan
In your Cucumber stories, of course! But even in Cucumber you have to implement that somehow, or? I don't know much about Cucumber as I do use Steak as mentioned, but I am pretty sure that there is a way to do that there, too. Controller and integration tests are needlessly painful.  Skip

[Rails] Rails3.0.1 select_tag returns null

2010-11-16 Thread Erick C.
content of select tag not posted with record (see attached file) Attachments: http://www.ruby-forum.com/attachment/5410/select_tag_error.txt -- 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] select_tag not posting selection

2010-11-16 Thread Erick C.
Here is the (Partial) code in the _form.html.erb: ---code fragment--- %= form_for(@order) do |f| % % if @order.errors.any? % div id=error_explanation h2%= pluralize(@order.errors.count, error) % prohibited this order from being saved:/h2 ul %

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread aperture science
I see, thanks. If I prepend %= debug @tags prior to the tag cloud block, I receive this on my page: --- - !ruby/object:ActsAsTaggableOn::Tag attributes: name: post test id: 2 count: 1 attributes_cache: {} readonly: true post test but it was necessary to move the @tags

Re: [Rails] Re: Re: Why is my models can't be related using has_one and belongs_to?

2010-11-16 Thread Colin Law
On 16 November 2010 22:03, arga aridarma arga_arida...@yahoo.com wrote: Please don't top post, it makes it difficult to follow the thread Without include, the debug return this: --- !ruby/object:ComUser attributes:  def_jabatan_id: 3  created_at: 2010-11-16 04:31:35  def_user_role_id: 1  

Re: [Rails] Substruct Shopping cart for rails 3?

2010-11-16 Thread seth b
Keith - the Substruct platform is definitely not for the new person learning Rails. Lauerence has done a great job on the Rails 3 branch, but it's not the main branch. We're still on Rails 2.3.8, which works perfectly fine. I'm personally waiting for Rails 3.1's engine improvements and some free

[Rails] Rails Engines/ Railties

2010-11-16 Thread apneadiving
Hi, I come to you after lots of investigations concerning Rails Engines. It appears (for a still young rails addict) that engines are not that documented, unless they seem so powerful. Of course, I read the sources given int his post:

[Rails] Re: Best way to test web services and XMLHttpRequest

2010-11-16 Thread Marnen Laibow-Koser
turkan wrote in post #961947: In your Cucumber stories, of course! But even in Cucumber you have to implement that somehow, or? Right. I don't know much about Cucumber as I do use Steak as mentioned, but I am pretty sure that there is a way to do that there, too. I hadn't heard of Steak

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread Marnen Laibow-Koser
aperture science wrote in post #961957: I see, thanks. If I prepend %= debug @tags prior to the tag cloud block, I receive this on my page: --- - !ruby/object:ActsAsTaggableOn::Tag attributes: name: post test id: 2 count: 1 attributes_cache: {} readonly: true post

[Rails] Re: Best way to test web services and XMLHttpRequest

2010-11-16 Thread turkan
I hadn't heard of Steak before.  A quick look at the rdoc makes me think it's basically an inferior version of Cucumber. :)  It looks to me like the author of Steak kind of missed the point that the English-like syntax of Cucumber is usually an advantage. Usually is not always. And not in our

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread aperture science
On Nov 16, 3:27 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Where was it before (when it wasn't working)? It had been defined within the tag_cloud definition, which I had assumed would be processing the loop based on tag_cloud(@tags, %w(css1 css2 css3 css4)) I have since found it

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread Marnen Laibow-Koser
aperture science wrote in post #961979: On Nov 16, 3:27pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Where was it before (when it wasn't working)? It had been defined within the tag_cloud definition, which I had assumed would be processing the loop based on tag_cloud(@tags, %w(css1

[Rails] Re: Best way to test web services and XMLHttpRequest

2010-11-16 Thread Marnen Laibow-Koser
turkan wrote in post #961975: I hadn't heard of Steak before. A quick look at the rdoc makes me think it's basically an inferior version of Cucumber. :) It looks to me like the author of Steak kind of missed the point that the English-like syntax of Cucumber is usually an advantage. Usually

[Rails] Re: Observe_filed Rails 3.

2010-11-16 Thread MDM
I think I have now solved the problem of doing an ajax call via programming. I will have to check it out in all types of browsers, but at the moment it is working in Firefox and Safari. I have now also moved both javascript document.observe(dom:loaded and the function it calls respondToChange() to

[Rails] Rails 3.0.3 - Error on Install

2010-11-16 Thread CuriousNewbie
X-MacBook-Pro:cline xxx$ sudo gem install rails ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: getaddrinfo: nodename nor servname provided, or not known (http://rubygems.org/gems/railties-3.0.3.gem) Anyone else getting this? -- You received this

[Rails] [ANN] Mail 2.2.10 Release Announcement

2010-11-16 Thread Mikel Lindsaar
Hi all, I'm happy to announce 2.2.10. This is a patch update introducing a few new features and fixing some bugs. All users of mail should upgrade. Changes since 2.2.9: * Added test retriever and updated documentation (Donald Ball) * Fix test suite to work in any timezone (Donald Ball) *

[Rails] Re: acts_as_taggable, undefined method 'empty?'

2010-11-16 Thread aperture science
On Nov 16, 4:27 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: No, I mean where did you *set* @tags, not where did you read it? within the tag_cloud action defined within the controller from which i was calling tag_cloud That's pretty standard Rails.  You can use a before_filter to

Re: [Rails] Re: Re: Why is my models can't be related using has_one and belongs_to?

2010-11-16 Thread arga aridarma
- Original Message From: Colin Law clan...@googlemail.com To: rubyonrails-talk@googlegroups.com Sent: Wednesday, November 17, 2010 5:29:48 Subject: Re: [Rails] Re: Re: Why is my models can't be related using has_one and belongs_to? On 16 November 2010 22:03, arga aridarma

[Rails] How do I create a function

2010-11-16 Thread Jason Hhh
Can someone explain to me how I create a function in ROR, where put it and how I access it? Do I just create another action? What is the correct way to do this? Any help would be appreciated. Jason -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] Re: Best way to test web services and XMLHttpRequest

2010-11-16 Thread turkan
In what way not?  I suspect that if you can't write your Cucumber stories in English, you're putting too much into them that should be in model specs... In some cases developers choose to simply not want the verbosity of Cucumber. Belief it or not :-P It is the same discussion like erb vs

[Rails] How to use request helpers outside of controller tests?

2010-11-16 Thread turkan
I'd like to use the request helpers (ActionDispatch::Integration::RequestHelpers ) outside of my RSpec controller tests (in other RSpec tests), but I don't know how to include and use them there. Best regards, Kai -- You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: Best way to test web services and XMLHttpRequest

2010-11-16 Thread Marnen Laibow-Koser
turkan wrote in post #962004: In what way not? I suspect that if you can't write your Cucumber stories in English, you're putting too much into them that should be in model specs... In some cases developers choose to simply not want the verbosity of Cucumber. Belief it or not :-P Then that

[Rails] Re: How do I create a function

2010-11-16 Thread Marnen Laibow-Koser
Jason Hhh wrote in post #961994: Can someone explain to me how I create a function in ROR, By learning Ruby. where put it and how I access it? Do I just create another action? What is the correct way to do this? That depends on what you're trying to achieve. Any help would be

[Rails] Re: How do I create a function

2010-11-16 Thread Jason Hhh
Marnen, That was absolutely no help. Thanks anyways. Jason -- 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

[Rails] RSpec Test: has_many and belongs_to conflicts

2010-11-16 Thread Luis Romero
Hello everyone, I am having a hard time testing that my has_many and belongs_to relationships are mapped to the correct DB columns. Does anyone have any suggestions or good strategies for testing that these relationships are properly mapped throughout an application? An example follows: Let's

Re: [Rails] Re: How do I create a function

2010-11-16 Thread David Kahn
On Tue, Nov 16, 2010 at 8:12 PM, Jason Hhh li...@ruby-forum.com wrote: Marnen, That was absolutely no help. Your question is very vague, and there is a lot of information available online... if you google 'ruby function' you will find this link, which gives an answer as broad as your

[Rails] Re: How do I create a function

2010-11-16 Thread Jason Hhh
I have a rails app. I understand how to create a function in Rails. I have a contact that is viewable by multiple users. I want to create a function to lock and unlock the contact. I have a field in the contact database called locked. I assume I create a new function in the action

Re: [Rails] Re: How do I create a function

2010-11-16 Thread Brian Troutwine
On Tue, Nov 16, 2010 at 9:48 PM, Jason Hhh li...@ruby-forum.com wrote: I have a rails app.  I understand how to create a function in Rails. I have a contact that is viewable by multiple users.  I want to create a function to lock and unlock the contact.  I have a field in the contact database

[Rails] Re: RSpec Test: has_many and belongs_to conflicts

2010-11-16 Thread Marnen Laibow-Koser
Luis Romero wrote in post #962011: Hello everyone, I am having a hard time testing that my has_many and belongs_to relationships are mapped to the correct DB columns. Does anyone have any suggestions or good strategies for testing that these relationships are properly mapped throughout an

[Rails] Re: How do I create a function

2010-11-16 Thread Jason Hhh
Thanks Brian! -- 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 email to

[Rails] Re: rails path_prefix produces no correct verb route evaluation

2010-11-16 Thread Blake Miller
I can confirm this. Rails 2.3.6. Interestingly, it tries to run both create AND index. For example, in my app, it posts to the correct create action in the controller; however, I have global error rescuing via: rescue_from Exception, :with = :rescue_all_exceptions if RAILS_ENV ==

[Rails] Re: Devise: binding 'resource' (aka general error reporting)

2010-11-16 Thread pgpkeys
Much obliged for this answer! On Nov 12, 3:48 pm, Fearless Fool li...@ruby-forum.com wrote: I figured out the answer to my own question, and I'm embarrassed by how trivial it is: create a helper function that takes @user, @topic, @profile etc as an argument.  For example: #

[Rails] JOB super nice, funded start up building rails team

2010-11-16 Thread ZED
Hello, I run a new start up called Zamzee, take a look at zamzee.com. We are creating a reward programme powered by physical activity for teens. We are funded and have some great backers in for the long term. We are looking for 2 rockstar rails developers to build and shape our development

[Rails] Re: foreigner plugin.

2010-11-16 Thread Phoenix Rising
Basically, Rails uses the has_many/one belongs_to features to mimic the functionality of a database foreign key. A real foreign key, however, is built DIRECTLY into the database structure itself instead of relying on Rails to make it work. This is useful in situations where you have a Rails

[Rails] Re: How do I create a function

2010-11-16 Thread Phoenix Rising
Just to hopefully elaborate on things a bit here to help you out Jason - In Ruby, since it's literally a pure Object Oriented language, generally you'll see functions referred to instead as methods. Same thing basically, just a nomenclature difference that could make things easier in the future

[Rails] Re: Script working on boot drive, but not external drive with space in the name. Please help!

2010-11-16 Thread Frederick Cheung
On Nov 16, 9:18 pm, yaphi jconto...@gmail.com wrote: Thanks for the response but I tried tacking on an escaped path to the beginning of the path variable and it still gives me the same error. Also notice that my boot drive has a space in it's volume name and the script runs fine. Assuming

[Rails] Re: foreigner plugin.

2010-11-16 Thread Dani Dani
Thank you Marnen and Phoenix for your detailed explanations. I do understand the functionality of the foreign key. I just was not sure whether relying on rails's foreign key functionaliy is good enough and there is no need to do it directly on the database, but now reading Phoenix's