[Rails] Re: Build associated model confusion

2010-12-16 Thread Melih Onvural
Thanks you guys! Got things working, but having some problems with GeoKit and Rails3. I'll have to do some more investigation on that front! -- Melih O. http://www.onvural.net/melih On Dec 15, 7:19 am, Marnen Laibow-Koser wrote: > Simon Baumgartner wrote in post #968527: > > > A comment about y

[Rails] Re: How to relate model with self value?

2010-12-16 Thread j.masuda
Hi Peter. Your code worked fine! It helped me great. And for all respondent Thanks for your help. On 12月16日, 午前6:30, Peter Vandenabeele wrote: > On Wed, Dec 15, 2010 at 3:24 PM, Masuda wrote: > > I'm developing with ruby-1.9. 1 rails 3.0.0. > > I want to relate 'User' model and 'Payment' model

[Rails] rspec-core-2.3.1 is released

2010-12-16 Thread David Chelimsky
### rspec-core-2.3.1 / 2010-12-16 full changelog: http://github.com/rspec/rspec-core/compare/v2.3.0...v2.3.1 * Bug fixes * send debugger warning message to $stdout if RSpec.configuration.error_stream has not been defined yet. * HTML Formatter _finally_ properly displays nested groups (Ja

[Rails] rspec-rails-2.3.1 is released!

2010-12-16 Thread David Chelimsky
### rspec-rails-2.3.1 / 2010-12-16 [full changelog](http://github.com/rspec/rspec-rails/compare/v2.3.0...v2.3.1) * Bug fixes * respond_to? correctly handles 2 args * scaffold generator no longer fails on autotest directory -- You received this message because you are subscribed to the Googl

Re: [Rails] preserving carriage returns

2010-12-16 Thread Walter Lee Davis
On Dec 16, 2010, at 9:06 PM, John Sayeau wrote: I tried to split string by: <% @day.food.split('\r\n').each do |line| %> <%= line %> <%end%> but it doesn't work. The \r\n is there. I put a <% p line %> in and looked at the logs. The string does not get split. anyone help? Try this: <

[Rails] Re: form_tag not passing a js call in Rails3

2010-12-16 Thread loominator1970
Yep, Javascript is enabled, and working fine. Apparently, I have stumped the brightest minds in the rails world :) That can only mean one thing...i'm overlooking something very simple and I'll feel quite dumb when the answer is presented to me :) On Dec 16, 3:09 pm, dsadaka wrote: > I'm sure yo

[Rails] preserving carriage returns

2010-12-16 Thread John Sayeau
When I enter some text in a text_area with carriage returns and then store the text in a database the carriage returns are preserved in the db. When I get the string back the carriage returns are gone, replace by spaces. example. if I enter : blah blah blah the db stores: blah blah blah when i

[Rails] model fields

2010-12-16 Thread Simon Grant
I have a database table with over 100 fields, however I want my model to include only a few fields so that every time I do a query/update, it will only do so for those fields. Is there a way to specify in a model to only use selected fields from a table and ignore the rest? Thankyou. -- Posted

[Rails] Re: How does ActiveRecord translate parameter hash to values of a class instance's properties

2010-12-16 Thread Robert Walker
John Merlino wrote in post #968948: > Since User class inherits from ActiveRecord class, I presume > ActiveRecord contains a constructor that takes the key/value pairs of a > hash from the parameters of web form and checks if the keys of the hash > match the instance methods available in current cl

[Rails] Re: How does ActiveRecord translate parameter hash to values of a class instance's properties

2010-12-16 Thread Frederick Cheung
On Dec 16, 9:49 pm, John Merlino wrote: > Hence, you can now do @user.login - should login be a field in the > database. If a value for login was captured in the param hash, then > @user.login will return value passed from params hash. > > Does anyone have a general description of what ActiveRe

[Rails] Re: form_tag not passing a js call in Rails3

2010-12-16 Thread dsadaka
I'm sure you checked this but just in case... based on what you just said, check to make sure you haven't disabled JS in your browser. Put a "Hello World" script in Application.js I'm using jQuery in Rails 3 with Ruby 1.9.2 and it's working fine: I use <%= javascript_include_tag :default %> with

[Rails] How does ActiveRecord translate parameter hash to values of a class instance's properties

2010-12-16 Thread John Merlino
Hey all, Let's say you have this method: def signup @user = User.new(params[:user]) if request.post? if @user.save session[:user] = User.authenticate(@user.login, @user.password) flash[:message] = "Signup successful" redirect_to :action => "welcome" else flash[

[Rails] Re: ruby on rails - Video upload And video chat questions

2010-12-16 Thread Sr nuwton Sr
Thanks I didn't know what plugin would help me -- 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 gr

[Rails] Re: ruby on rails - Video upload And video chat questions

2010-12-16 Thread Marnen Laibow-Koser
Www.ebcmi.com Www.ebcmi.com wrote in post #968942: > I have not understood how to upload images/video/ or video chats with > ruby onrails yet. Most people use Paperclip. > Would I need to make a model for each of those types > of data? >Profile Model > Like for instance, Name:

[Rails] ruby on rails - Video upload And video chat questions

2010-12-16 Thread Www.ebcmi.com Www.ebcmi.com
I have not understood how to upload images/video/ or video chats with ruby onrails yet. Would I need to make a model for each of those types of data? Profile Model Like for instance, Name:string age:integer. But how would I put a video model or a video chat model or image model.

[Rails] Re: active merchant - payal

2010-12-16 Thread Marnen Laibow-Koser
Chris Habgood wrote in post #968936: > I have an active site that has nothing but the code to do login with on > the > backend. How do I get to where I can get to see what the signature is > for > the user if all he has is the login for production? Uh, what? Your question is extremely unclear.

[Rails] Re: Re: help with favicon_link_tag undefined

2010-12-16 Thread Marnen Laibow-Koser
Hassan Schroeder wrote in post #968935: > On Thu, Dec 16, 2010 at 11:48 AM, Marnen Laibow-Koser > wrote: > >> BTW, I recommend http://www.railsbrain.com for Rails docs. > > ? Good for historical reference, I guess, but the most recent version > there is 2.3.2 ... > Aaaugh! Mistyped. I meant htt

[Rails] active merchant - payal

2010-12-16 Thread Me
I have an active site that has nothing but the code to do login with on the backend. How do I get to where I can get to see what the signature is for the user if all he has is the login for production? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails

[Rails] Re: Problem with Command Prompt

2010-12-16 Thread Jose tomas R.
sorry didnt know why it didnt work earlier thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this

Re: [Rails] Re: help with favicon_link_tag undefined

2010-12-16 Thread Hassan Schroeder
On Thu, Dec 16, 2010 at 11:48 AM, Marnen Laibow-Koser wrote: > BTW, I recommend http://www.railsbrain.com for Rails docs. ? Good for historical reference, I guess, but the most recent version there is 2.3.2 ... -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @h

[Rails] Re: XML behaviour issue

2010-12-16 Thread Kefan X.
Marnen Laibow-Koser wrote in post #968931: > Kefan X. wrote in post #968930: >> I am trying to parse both rss feed and atom feed using Nokogiri. > > There's probably a library that does this already; if there is, you > should use it if possible. But read on for other ideas. > >> I'm >> meeting a p

[Rails] Re: form_tag not passing a js call in Rails3

2010-12-16 Thread loominator1970
Nope, nothing in the application.js file. Checked the firebug output and there is nothing. The JS is not even getting fired, which make no sense because I have the ':remote => true' statement in there. It even creates the 'data-remote' call in the HTML output (see below). I thought that was the

[Rails] Re: XML behaviour issue

2010-12-16 Thread Marnen Laibow-Koser
Kefan X. wrote in post #968930: > I am trying to parse both rss feed and atom feed using Nokogiri. There's probably a library that does this already; if there is, you should use it if possible. But read on for other ideas. > I'm > meeting a problem where i cannot use one query to universally se

[Rails] XML behaviour issue

2010-12-16 Thread Kefan X.
I am trying to parse both rss feed and atom feed using Nokogiri. I'm meeting a problem where i cannot use one query to universally select both rss element and atom element. E.g. @item = "item" root.xpath(//#...@item}) will select for rss @item = "entry" root.xpath(//#...@item}) will not select fo

[Rails] Re: Devise com mais de um model

2010-12-16 Thread Marnen Laibow-Koser
ebfjun...@gmail.com wrote in post #968927: > Opa! :-) > > Tenho corrido atrs feito um louco de tutoriais sobre STI(Single Table > Inheritance) e Associaes Polimrficas pra usar com o devise e > mltiplos models. > T com um problemo aqui, tenho trs models('admin.rb', > 'pesquisador.rb' e 'bolsista.rb'

[Rails] Re: help with favicon_link_tag undefined

2010-12-16 Thread Marnen Laibow-Koser
Craig Anderson wrote in post #968926: > Marnen Laibow-Koser wrote in post #968924: >> Again: please don't top-post! Insert your replies inline as I have >> done. >> >> Craig Anderson wrote in post #968923: >>> http://apidock.com/rails/ActionView/Helpers/AssetTagHelper/favicon_link_tag >>> >> >> Re

[Rails] Devise com mais de um model

2010-12-16 Thread ebfjun...@gmail.com
Opa! :-) Tenho corrido atrás feito um louco de tutoriais sobre STI(Single Table Inheritance) e Associações Polimórficas pra usar com o devise e múltiplos models. Tô com um problemão aqui, tenho três models('admin.rb', 'pesquisador.rb' e 'bolsista.rb'), o típico caso de professor, aluno e administr

[Rails] Re: help with favicon_link_tag undefined

2010-12-16 Thread Craig Anderson
Marnen Laibow-Koser wrote in post #968924: > Again: please don't top-post! Insert your replies inline as I have > done. > > Craig Anderson wrote in post #968923: >> http://apidock.com/rails/ActionView/Helpers/AssetTagHelper/favicon_link_tag >> > > Read the text in the big blue box. Alright, I've n

[Rails] Re: help with favicon_link_tag undefined

2010-12-16 Thread Marnen Laibow-Koser
Again: please don't top-post! Insert your replies inline as I have done. Craig Anderson wrote in post #968923: > http://apidock.com/rails/ActionView/Helpers/AssetTagHelper/favicon_link_tag > Read the text in the big blue box. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org

[Rails] Re: help with favicon_link_tag undefined

2010-12-16 Thread Craig Anderson
http://apidock.com/rails/ActionView/Helpers/AssetTagHelper/favicon_link_tag Marnen Laibow-Koser wrote in post #968920: > Please don't top-post. > > Craig Anderson wrote in post #968919: >> I'm just learning rails and trying to learn the rails way. I expected >> that module ActionView::Helpers::As

[Rails] Re: help with favicon_link_tag undefined

2010-12-16 Thread Craig Anderson
What is top-post? Marnen Laibow-Koser wrote in post #968920: > Please don't top-post. > > Craig Anderson wrote in post #968919: >> I'm just learning rails and trying to learn the rails way. I expected >> that module ActionView::Helpers::AssetTagHelper >> would be available in the view. > > It is.

[Rails] Re: Problem with Command Prompt

2010-12-16 Thread Marnen Laibow-Koser
Tim Shaffer wrote in post #968915: > This isn't really related to RoR... > > BUT, you can simply change drives by typing the drive letter: > > C:\Documents and Settings\tim> h: > H:\> Basic Windows command prompt support? Have we reached a new low in off-topicness? :D Best, -- Marnen Laibow-Kos

[Rails] Re: help with favicon_link_tag undefined

2010-12-16 Thread Marnen Laibow-Koser
Please don't top-post. Craig Anderson wrote in post #968919: > I'm just learning rails and trying to learn the rails way. I expected > that module ActionView::Helpers::AssetTagHelper > would be available in the view. It is. But favicon_link_tag is not defined in there, at least according to th

[Rails] Re: help with favicon_link_tag undefined

2010-12-16 Thread Craig Anderson
I'm just learning rails and trying to learn the rails way. I expected that module ActionView::Helpers::AssetTagHelper would be available in the view. Marnen Laibow-Koser wrote in post #968906: > > Where would you expect favicon_link_tag to be defined? The error > message is accurate. > > -- > m

[Rails] Re: html tag id from variable

2010-12-16 Thread Marnen Laibow-Koser
Ryan F. wrote in post #968910: > First thank you for your quick response. This forum seems like a place > I will be able to learn some proper rails coding. > >> NO! NO! NO! NEVER USE GLOBAL VARIABLES FOR THIS SORT OF THING! > > I have never programmed in ruby and have inherited this application

[Rails] Re: Re: Re: Using Shoulda with Test/Unit in Rails 3

2010-12-16 Thread Marnen Laibow-Koser
David Kahn wrote in post #968911: > On Wed, Dec 15, 2010 at 8:30 AM, Marnen Laibow-Koser > wrote: > >> >> >> value.should == 3 >> I assure you, it is necessary. The assert_ syntax of Test::Unit lends >> I just looked up Shoulda's documentation to see the differences. I >> better designed one. Th

[Rails] Re: Problem with Command Prompt

2010-12-16 Thread Tim Shaffer
This isn't really related to RoR... BUT, you can simply change drives by typing the drive letter: C:\Documents and Settings\tim> h: H:\> -- 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: Re: Using Shoulda with Test/Unit in Rails 3

2010-12-16 Thread David Kahn
On Wed, Dec 15, 2010 at 8:30 AM, Marnen Laibow-Koser wrote: > David Kahn wrote in post #968465: > > On Tue, Dec 14, 2010 at 4:26 PM, Marnen Laibow-Koser > > wrote: > > > >> > fine. I tried placing "require 'shoulda'" in test helper to no avail, > >> > but > >> > when I run the debugger and type S

[Rails] Re: html tag id from variable

2010-12-16 Thread Ryan F.
First thank you for your quick response. This forum seems like a place I will be able to learn some proper rails coding. > NO! NO! NO! NEVER USE GLOBAL VARIABLES FOR THIS SORT OF THING! I have never programmed in ruby and have inherited this application to only make a few small changes. Un

[Rails] Problem with Command Prompt

2010-12-16 Thread Jose tomas R.
Im running ROR on my laptop, but i also work on my desktop pc, so i decide to move my proyect to a USB flashdrive, but when im trying to cd my E:\ drive i cant do it, im running windows XP on both. is there a command to change drive or is this not possible? -- Posted via http://www.ruby-forum.com

[Rails] Re: help with favicon_link_tag undefined

2010-12-16 Thread Marnen Laibow-Koser
Craig Anderson wrote in post #968905: > What is the rails way to do this? I'm using Rails 2.3.10 > > Error is: > undefined local variable or method `favicon_link_tag' for > # Where would you expect favicon_link_tag to be defined? The error message is accurate. > > This module is needed I guess

[Rails] help with favicon_link_tag undefined

2010-12-16 Thread Craig Anderson
What is the rails way to do this? I'm using Rails 2.3.10 Error is: undefined local variable or method `favicon_link_tag' for # This module is needed I guess: ActionView::Helpers::AssetTagHelper Here is what I did: app/views/layouts/application.html.haml !!! 5 %html %head %title App1 - Rai

[Rails] Re: html tag id from variable

2010-12-16 Thread Marnen Laibow-Koser
Ryan F. wrote in post #968899: > I would like to create the id portion of a tag using a string > variable. In my program i have a table that will have a varying number > of columns determined by a variable in the parameter file, $gItems. NO! NO! NO! NEVER USE GLOBAL VARIABLES FOR THIS SORT OF

[Rails] html tag id from variable

2010-12-16 Thread Ryan F.
I would like to create the id portion of a tag using a string variable. In my program i have a table that will have a varying number of columns determined by a variable in the parameter file, $gItems. I would like to be able to loop through each row labeling each column based on its column numbe

[Rails] Re: ror hosting providers?

2010-12-16 Thread Nicolas Buduroi
Hi, I've only got experience with VPS so far. I've got mixed feelings about ocssolutions.com, they were quite good at first (4 years ago), but I didn't like their support in the long run, I've not used them for a while so they may have improved. On my latest project, we had an horrible experience w

[Rails] Re: UTF-8 String.strip bug (and several over methods)

2010-12-16 Thread Peter Vandenabeele
Frederick Cheung wrote in post #968521: > On Dec 14, 4:22pm, Bob Mundane wrote: >> Hello, with Rails 3.0.3 >> >> "Caf Noir ".strip => "Caf noir" >> but >> "Caf ".strip => "Caf\303\251" > > While it may not look pretty this is accurate if you are using utf8 - > is 0xC3 0xA9 in UTF8, which is 0o303

Re: [Rails] redirect_to an non rails url with params

2010-12-16 Thread Colin Law
On 16 December 2010 16:35, Guo Yangguang wrote: > hello > the non rails url is > > https://graph.facebook.com/oauth/authorize?client_id=...&redirect_uri=http://www.example.com/oauth_redirect > > how do i use redirect_to method in my rails app to redirect to the url > above? i am confused how to ap

Re: [Rails] Re: Re: CakePHP

2010-12-16 Thread Colin Law
On 16 December 2010 16:33, Luciano Sousa wrote: > no Marlen, is not addressed to you. I'm manager ruby list and received many > threads over this. all threads about this are spammers. same format, and > note that the 'person' Anny do not reply, no more... I think maybe my posts are too subtle. C

[Rails] redirect_to an non rails url with params

2010-12-16 Thread Guo Yangguang
hello the non rails url is https://graph.facebook.com/oauth/authorize?client_id=...&redirect_uri=http://www.example.com/oauth_redirect how do i use redirect_to method in my rails app to redirect to the url above? i am confused how to append params.All of the following three ways don't work. 1 r

Re: [Rails] Re: Re: CakePHP

2010-12-16 Thread Luciano Sousa
no Marlen, is not addressed to you. I'm manager ruby list and received many threads over this. all threads about this are spammers. same format, and note that the 'person' Anny do not reply, no more... reply similar threads are not interesting. I'm sorry for my previous comment. thanks. Best Re

Re: [Rails] Re: Multiple record update and validation

2010-12-16 Thread Colin Law
On 16 December 2010 16:14, Brian Penrose wrote: > Colin Law wrote in post #968879: >> On 16 December 2010 15:53, Brian Penrose wrote: >>> end >>> validates_presence_of :location >>> >>> Like I mentioned...the updates work fine, however when I try to edit >>> records and leave location empty, it s

Re: [Rails] Re: Re: CakePHP

2010-12-16 Thread David Kahn
Its pretty obvious the spammer is Anny Phpluring the naive sheep away from RoR quite a subtle scheme On Thu, Dec 16, 2010 at 10:16 AM, Marnen Laibow-Koser wrote: > Colin Law wrote in post #968881: > > On 16 December 2010 15:54, Luciano Sousa > > wrote: > >> spammer. > > > > I have not he

[Rails] Re: Re: CakePHP

2010-12-16 Thread Marnen Laibow-Koser
Colin Law wrote in post #968881: > On 16 December 2010 15:54, Luciano Sousa > wrote: >> spammer. > > I have not heard Marnen called a spammer before (other things yes, but > not that). I presume the comment was addressed to him as that is the > post you replied to, but since you have top posted r

[Rails] Re: Multiple record update and validation

2010-12-16 Thread Brian Penrose
Colin Law wrote in post #968879: > On 16 December 2010 15:53, Brian Penrose wrote: >> end >> validates_presence_of :location >> >> Like I mentioned...the updates work fine, however when I try to edit >> records and leave location empty, it still attempts to save the record >> w/out first running v

Re: [Rails] Re: CakePHP

2010-12-16 Thread Colin Law
On 16 December 2010 15:54, Luciano Sousa wrote: > spammer. I have not heard Marnen called a spammer before (other things yes, but not that). I presume the comment was addressed to him as that is the post you replied to, but since you have top posted rather than inserting your comment inline it i

Re: [Rails] Re: rails training?

2010-12-16 Thread Rodrigo Mendonça
Marnen is sure. It's call RAILS WAY. It's diferent from Java and PHP You need walk trough this 2010/12/16 Marnen Laibow-Koser > BigNate wrote in post #968870: > > I'm new to Rails and have PHP/MySQL & Coldfusion/SQL knowledge from past > > jobs. Are there any good tutorials out there that co

Re: [Rails] Multiple record update and validation

2010-12-16 Thread Colin Law
On 16 December 2010 15:53, Brian Penrose wrote: > I have a form which is used to update multiple records (of the same > model) at one time, which it successfully does, but when I try to add > vaildation to the form, it seems to be ignored. > > Code from the update method of my controller: > > def

Re: [Rails] Re: CakePHP

2010-12-16 Thread Luciano Sousa
spammer. Best Regards, Luciano Sousa http://www.lucianosousa.net http://twitter.com/lucianosousa http://rubyonrio.org *Ruby on Rails Developer *Linux User #456387 *Contact: +55 21 8418-5945 2010/12/16 Marnen Laibow-Koser > gemblon (t.b.) wrote in post #606493: > > i was looking at cake php. i

[Rails] Re: rails training?

2010-12-16 Thread Marnen Laibow-Koser
BigNate wrote in post #968870: > I'm new to Rails and have PHP/MySQL & Coldfusion/SQL knowledge from past > jobs. Are there any good tutorials out there that could relate PHP or > CF so > that Rails makes more sense? I came to Rails after years of working with PHP and ColdFusion. But I wouldn't

[Rails] Multiple record update and validation

2010-12-16 Thread Brian Penrose
I have a form which is used to update multiple records (of the same model) at one time, which it successfully does, but when I try to add vaildation to the form, it seems to be ignored. Code from the update method of my controller: def update SurvCamera.transaction do SurvCamera.update(para

Re: [Rails] rails training?

2010-12-16 Thread Rodrigo Mendonça
I know this site to you begin http://railsforphp.com/ Use the search of this site and insert a php function, and it wiil give the same function in Ruby 2010/12/16 Colin Law > On 15 December 2010 21:43, BigNate wrote: > > I'm new to Rails and have PHP/MySQL & Coldfusio

[Rails] Re: A Ruby Mixin Question

2010-12-16 Thread elliottg
Makes sense. Thanks Marnem On Dec 15, 10:23 pm, Marnen Laibow-Koser wrote: > Elliott Golden wrote in post #968758: > > > Ruby centric I know, but... How can you define class methods or > > variables on > > a host class by mixing-in a module? > > Take a look at extend, and at the included and exte

Re: [Rails] rails training?

2010-12-16 Thread Colin Law
On 15 December 2010 21:43, BigNate wrote: > I'm new to Rails and have PHP/MySQL & Coldfusion/SQL knowledge from past > jobs.  Are there any good tutorials out there that could relate PHP or CF so > that Rails makes more sense?  I'm struggling to understand how things work > and the best way to wor

Re: [Rails] distance_of_time_in_words shows {{count}} days instead of showing actual days

2010-12-16 Thread Colin Law
On 15 December 2010 19:07, Amit Ambardekar wrote: > I have following code in view > > <% if @next_topic %> > Time to show next topic <%= distance_of_time_in_words(Time.now.utc, > @next_topic.time_to_show.utc) %> > > <% end %> > > Output: > > Time to show next topic {{count}} days Are you using i

[Rails] distance_of_time_in_words shows {{count}} days instead of showing actual days

2010-12-16 Thread Amit Ambardekar
I have following code in view <% if @next_topic %> Time to show next topic <%= distance_of_time_in_words(Time.now.utc, @next_topic.time_to_show.utc) %> <% end %> Output: Time to show next topic {{count}} days time_to_show has following value Mon, 20 Dec 2010 12:38:00 UTC

[Rails] rails training?

2010-12-16 Thread BigNate
I'm new to Rails and have PHP/MySQL & Coldfusion/SQL knowledge from past jobs. Are there any good tutorials out there that could relate PHP or CF so that Rails makes more sense? I'm struggling to understand how things work and the best way to work through tasks. Any help would be great. --

[Rails] MassAssignmentSecurity for multiple contexts

2010-12-16 Thread Shimon Amit
I need to add some mass assignment protection (ala ActiveModel::MassAssignmentSecurity) but I can't find how to do it contextually. For example, in one controller action I want to to whitelist attributes x, y and z and in another I want to whitelist attribs y and z. How can I do that? The attr_acce

[Rails] How do I debug ruby 1.9.2p0 in NetBeans?

2010-12-16 Thread Alpha Sisyphus
Hi, I'm running OpenSuSE 11.3 and am having problems debugging rails3 application in NetBeans 6.9.1 (ruby 1.9.2p0, rails 3.0.3, rvm). 1. I have installed ruby-debug19, ruby-debug-ide19 2. Changed Gemfile, so that the line 'gem ruby-debug19' is not commented out 3. Ran 'bundle install' When I ran

Re: [Rails] How to relate model with self value?

2010-12-16 Thread Peter Vandenabeele
On Wed, Dec 15, 2010 at 3:24 PM, Masuda wrote: > I'm developing with ruby-1.9. 1 rails 3.0.0. > I want to relate 'User' model and 'Payment' model with condition which > has the same value as 'user.testing' in 'payment.testing' > > I did > > Class User < ActiveRecord::Base >    has_many payments, :

[Rails] Re: Mysql query optimization for order condition

2010-12-16 Thread Daniel Salmer?n Amselem
Thanks! That makes much more sense. -- 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...@google

[Rails] Re: Capybara + radio buttons

2010-12-16 Thread Marnen Laibow-Koser
Colin Law wrote in post #968844: > On 16 December 2010 13:52, Sofie Willander wrote: >> How do I select a radio button when both id and name are identical?: >> >> > tabindex="13" value="J24" checked="checked" id="forare">Ja >> > tabindex="14" value="N24" id="forare">Nej > > I believe that is not v

[Rails] Re: Start with Cucumber

2010-12-16 Thread Marnen Laibow-Koser
Robert Walker wrote in post #968848: > Mike Disuza wrote in post #968779: >> Hi, >> I am trying to start with Cucumber for testing purpose. As I haven't >> done any testing in rails I am facing a problem to start. Can anyone >> tell me How can I start with Cucumber? > > Feature: Learn Cucumber >

Re: [Rails] Re: Capybara + radio buttons

2010-12-16 Thread Colin Law
On 16 December 2010 14:06, Sofie Willander wrote: > I have not written that code.. It's on a webpage that I'm trying to > screen scrape.. Please quote previous message when replying, otherwise it is difficult to follow the thread. Thanks. I suggest you contact the site owner and tell him/her you

[Rails] Re: Re: Re: Best way to do a find_by_or_create based on an attribute?

2010-12-16 Thread Aston J.
Philip Hallstrom wrote in post #968761: > ...why are you trying to save a @topic that > you either a) already found or b) just created (and saved) ?? Sorry I got confused for a second and thought the create action by default uses Topic.create() by default (when it actually uses Topic.new()). > I

[Rails] Re: Start with Cucumber

2010-12-16 Thread Robert Walker
Mike Disuza wrote in post #968779: > Hi, > I am trying to start with Cucumber for testing purpose. As I haven't > done any testing in rails I am facing a problem to start. Can anyone > tell me How can I start with Cucumber? Feature: Learn Cucumber In order to learn Cucumber and RSpec As a new

[Rails] Re: CakePHP

2010-12-16 Thread Marnen Laibow-Koser
gemblon (t.b.) wrote in post #606493: > i was looking at cake php. it is a rails look-a-like. and the language > looks like java. dang. Actually, PHP looks more like Perl than Java. But why bother with it when Ruby is so much of a better designed language? (For the record, I don't really share

[Rails] Re: Capybara + radio buttons

2010-12-16 Thread Sofie Willander
I have not written that code.. It's on a webpage that I'm trying to screen scrape.. Does it mean that I can't change selected button with Capybara? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gro

Re: [Rails] Capybara + radio buttons

2010-12-16 Thread Colin Law
On 16 December 2010 13:52, Sofie Willander wrote: > How do I select a radio button when both id and name are identical?: > > tabindex="13" value="J24" checked="checked" id="forare">Ja > tabindex="14" value="N24" id="forare">Nej I believe that is not valid html unless id values are unique. Coli

[Rails] Re: Capybara + radio buttons

2010-12-16 Thread Tim Shaffer
Short answer is the IDs should be unique. -- 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...@

[Rails] Capybara + radio buttons

2010-12-16 Thread Sofie Willander
How do I select a radio button when both id and name are identical?: Ja Nej Normally I use choose.('A radio button'), but that doesn't seem to work with values. Any ideas? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "

[Rails] Re: Refining an ActiveRecord search

2010-12-16 Thread Peter Laurens
> or Array.select to return all the matches > Basically, the Array and Enumerable APIs will probably have something > for you - have a read ;-) > > http://ruby-doc.org/core/classes/Array.html > http://ruby-doc.org/core/classes/Enumerable.html I think Array.select is the one for me, thanks! --

Re: [Rails] Refining an ActiveRecord search

2010-12-16 Thread Michael Pavling
On 16 December 2010 13:16, Michael Pavling wrote: > On 16 December 2010 11:46, Peter Laurens wrote: >> Hi, >> >> I am doing an ActiveRecord find against the database, bringing back a >> number of objects that have a created_on date between two dates. >> >> After this fetch, I want to check if the

Re: [Rails] Refining an ActiveRecord search

2010-12-16 Thread Michael Pavling
On 16 December 2010 11:46, Peter Laurens wrote: > Hi, > > I am doing an ActiveRecord find against the database, bringing back a > number of objects that have a created_on date between two dates. > > After this fetch, I want to check if the result contains an object with > a specific date You coul

[Rails] Re: Spreadsheet MVC

2010-12-16 Thread Ron Phillips
Serguei Cambour wrote in post #968794: > I used the following way to generate an Excel file for reports: > > 1; In the controller: > > [code] > def exports > @projects = Project.find(params[:project_ids]) > headers['Content-Type'] = "application/vnd.openxmlformats- > officedocument.spreadsh

[Rails] Re: Re: Refining an ActiveRecord search

2010-12-16 Thread Peter Laurens
> Please quote the previous message so individual messages in the thread > make sense. Sure, sorry. > >> My approach is this way because I can't guarantee that there will be a >> record with a certain date, yet I want to produce an array of results >> for a full contiguous range of dates. In the

Re: [Rails] Re: Refining an ActiveRecord search

2010-12-16 Thread Colin Law
On 16 December 2010 12:09, Peter Laurens wrote: Please quote the previous message so individual messages in the thread make sense. > My approach is this way because I can't guarantee that there will be a > record with a certain date, yet I want to produce an array of results > for a full contigu

[Rails] Re: Refining an ActiveRecord search

2010-12-16 Thread Peter Laurens
My approach is this way because I can't guarantee that there will be a record with a certain date, yet I want to produce an array of results for a full contiguous range of dates. In the case that there isn't a record with a certain date, I still want to put in a 'placeholder value' for that dat

Re: [Rails] Refining an ActiveRecord search

2010-12-16 Thread Colin Law
On 16 December 2010 11:46, Peter Laurens wrote: > Hi, > > I am doing an ActiveRecord find against the database, bringing back a > number of objects that have a created_on date between two dates. > > After this fetch, I want to check if the result contains an object with > a specific date (actually

[Rails] Rails3 active support not loading required dependencies?

2010-12-16 Thread Adinda Praditya
Hi All, I'm playing with readability gem. I can use it on irb but failed on Rails3 app. Here's the output http://pastie.org/private/1zuyaurnbkmq7u6raqkdhg I believe it's not a javascript error. Judging by the active support error, it failed loading the dependencies, I suspect that Rails has faile

[Rails] Refining an ActiveRecord search

2010-12-16 Thread Peter Laurens
Hi, I am doing an ActiveRecord find against the database, bringing back a number of objects that have a created_on date between two dates. After this fetch, I want to check if the result contains an object with a specific date (actually I want to iterate through all days in a range, and if the re

[Rails] Debugging problem with abstract class

2010-12-16 Thread Rob N.
'self.abstract_class = true' does not seem to be working in my Rails 3 project and I am having difficulty debugging the problem. Can anyone give me some pointers as to were I should look for possible conflicts? In a previous Rails 2 project I used an abstract class SoftDeletableBase to add soft de

[Rails] Re: Ambiguous match error for Cucumber

2010-12-16 Thread Bosko Ivanisevic
On Dec 16, 10:23 am, Mike Disuza wrote: > Hi, > I am trying out the cucumber tutorial > > http://www.ultrasaurus.com/sarahblog/2008/12/rails-2-day-3-behavior-d... > > My tasklist.feature file is like as follows > " > Feature: Tasks > In order to keep track of tasks > People should be able to > Cre

[Rails] Re: How to relate model with self value?

2010-12-16 Thread Peter Vandenabeele
Goro Kuroita wrote in post #968571: > Hi, > I'm developing with ruby-1.9. 1 rails 3.0.0. > I want to relate 'User' model and 'Payment' model with condition which > has the same value as 'user.testing' in 'payment.testing' > > I did > > Class User < ActiveRecord::Base > has_many payments, :condi

[Rails] Re: Mysql query optimization for order condition

2010-12-16 Thread Peter Vandenabeele
Daniel A. wrote in post #968711: > Hello everyone! I've a question that I hope someone in here would be > able to > answer. Today I was writing a simple test for a method that takes the > last > "n" (where n is an integer) users that signed up on my web app. > > I know it's a simple method, but the

[Rails] Ambiguous match error for Cucumber

2010-12-16 Thread Mike Disuza
Hi, I am trying out the cucumber tutorial http://www.ultrasaurus.com/sarahblog/2008/12/rails-2-day-3-behavior-driven-development/ My tasklist.feature file is like as follows " Feature: Tasks In order to keep track of tasks People should be able to Create a list of tasks Scenario: List Tasks Give

[Rails] Re: form_tag not passing a js call in Rails3

2010-12-16 Thread Ray Parker
Do you have anything pertinent/related/involved in the application.js file? Try pulling that out as you could be having a failure in JS that's causing grief. Also -- check your console in Firebug (or whatever you're using) and see if errors are being thrown when the page loads. On Dec 16, 1:19 

[Rails] Re: ror hosting providers?

2010-12-16 Thread Fallen Phoenix
The major providers I know of off the top of my head are Heroku (www.heroku.com), EngineYard (www.engineyard.com), and Rails Machine (www.railsmachine.com). I believe both Heroku and EngineYard provide "front-ends" to Amazon EC2 (in other words, what they provide is an access layer to EC2 specific

[Rails] Re: Re: I18n in model validations: Possible or not?

2010-12-16 Thread Tom Ha
Thanks for all the input! -- 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 r

[Rails] Re: Spreadsheet MVC

2010-12-16 Thread Javix
I used the following way to generate an Excel file for reports: 1; In the controller: [code] def exports @projects = Project.find(params[:project_ids]) headers['Content-Type'] = "application/vnd.openxmlformats- officedocument.spreadsheetml.sheet.main+xml" headers['Content-Disposition'