[Rails] Can't get rcov to work. 0 assertions returned.

2009-08-27 Thread Yuval Kordov
Hi folks. First post on these forums, after finally giving up on railsforum.com. I recently installed the relevance fork of rcov and am having no luck at all. http://github.com/relevance/rcov/tree/master [code] sudo gem install relevance-rcov [/code] Easy enough. Everything seems to have

[Rails] Re: Sum won't seem to add the fields?!

2009-08-27 Thread Colin Law
2009/8/26 Ruby on Rails: Talk dazzaroo...@gmail.com: I have the code which creates the following made up of an array of 3 TreatLists each with a number of Treatlistitems (I've broken it up to make it easier to read). ? @breakdown = [ #Treatlist:0x23b98ac @items=[ #Treatlistitem:0x2389ef4

[Rails] Re: 'ruby script/server' responds with: Missing the Rails gem. ... -- not true. Why?

2009-08-27 Thread binku
On 8月27日, 上午2时45分, Frederick C. Lee amourinet...@gmail.com wrote: Here's my environment (Mac OS X 10.5.8): [/Users/Ric/workarea/rails/demo]ruby --version ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9] [/Users/Ric/workarea/rails/demo]rails --version Rails 2.3.3

[Rails] Re: capistrano error.. can't use sudo

2009-08-27 Thread Sergio Ruiz
Robert Walker wrote: Sergio Ruiz wrote: set :user_sudo, false Should that not be?: set :use_sudo, false correct! thanks so much! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] Re: Sum won't seem to add the fields?!

2009-08-27 Thread Frederick Cheung
On Aug 27, 8:03 am, Colin Law clan...@googlemail.com wrote: 2009/8/26 Ruby on Rails: Talk dazzaroo...@gmail.com: I really have no idea why this is not working or not returning a zero value?! Any ideas please? A bit of a guess here but it may be that fact that this will attempt to

[Rails] HABTM for 3 different tables

2009-08-27 Thread Kart
Hi Everybody, I'm having 3 tables 1)Insurance 2)policy 3) Users and all have has and belongs to many relationships I want to link all this 3 tables . Plz guide me on how to link all these table using HABTM --~--~-~--~~~---~--~~ You received

[Rails] Re: 'ruby script/server' responds with: Missing the Rails gem. ... -- not true. Why?

2009-08-27 Thread Mukund
Modify your path to use /opt/local/bin before /usr/bin On Aug 27, 5:59 am, binku 006600...@gmail.com wrote: On 8月27日, 上午2时45分, Frederick C. Lee amourinet...@gmail.com wrote: Here's my environment (Mac OS X 10.5.8): [/Users/Ric/workarea/rails/demo]ruby --version ruby 1.9.1p0 (2009-01-30

[Rails] Re: DB / App Best Practice

2009-08-27 Thread Mukund
For admins and users, I would keep them both in the same table with a role field to differentiate them. It really depends on your security requirement and if admins and users login using the same authentication mechanism. A role table for lookup is required. For colors, MYSQL allows an ENUM

[Rails] Re: how to include module's class in controller?

2009-08-27 Thread Mukund
If it is a class, why are you encapsulating it inside a module? You should be able to put the class rb file in your lib directory and use it in your controller. Make sure you name the file right. Again if you need to namespace it inside a module, just include the module in your controller

[Rails] Re: How to stop a user submitting the same data more than once.

2009-08-27 Thread Mukund
enter just processes the submit button. if you disable the submit button, then enter key press will be disabled as well. personally, i would get rid of the submit tag and use a image_submit_tag to get rid of stupid keyboard annoyances. This will force the user to click on the link to submit

[Rails] Re: Noob DRY method question

2009-08-27 Thread Mukund
The API documentation will help with these. Bookmark http://api.rubyonrails.org http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#M001739 On Aug 26, 8:50 pm, Dudebot craign...@gmail.com wrote: Oops, meant to say In my sessions view I have... On Aug 26, 10:48 am,

[Rails] Re: Noob DRY method question

2009-08-27 Thread Dudebot
Thanks super. I'm still getting used to this framework, which includes figuring out where and how it's documented :) On Aug 27, 3:58 am, Mukund marut...@yahoo.com wrote: The API documentation will help with these.   Bookmarkhttp://api.rubyonrails.org

[Rails] Re: How to stop a user submitting the same data more than once.

2009-08-27 Thread Jim Burgess
Thanks for all of the answers. I solved it a little differently and will explain how in case a) it helps anybody else b) there is a flaw in my method which I have overlooked What I did was in the controller: Create a model object: @applicant = Applicant.new(params[:applicant]) Wait for a post

[Rails] who is Why? And why he disappeared?

2009-08-27 Thread Sijo Kg
Hi Have you read this? http://www.globalnerdy.com/2009/08/20/how-and-where-is-_why/ Why this person vanished?Anyone knows? And actually who is he? Why did he do that? Please share your thoughts Sijo -- Posted via http://www.ruby-forum.com/.

[Rails] forcing selected item in select

2009-08-27 Thread RVince
How do I make sure item 0 is selected in: %= select(channelnotes, channelnotes, Channelnote.find (:all, :order = 'tstamp DESC', :limit =3, :conditions = [deleted=0]).collect {|p| [ p.note, p.note]}, { :include_blank = true},{:onKeyDown = fnKeyDownHandler(this, event);, :onKeyUp =

[Rails] Asserting PUT methods

2009-08-27 Thread Jarl Friis
Hi. In my view I have a line like this: link_to('Update timestamp', order_path(@order, :update_timestamp = true), :method = :put This generates HTML like this a href=/orders/2131771394?update_timestamp=true onclick=var f = document.createElement('form'); f.style.display = 'none';

[Rails] What is the best server for RoR ?

2009-08-27 Thread Roshan Sainju
Hi all, I have been deploying my RoR application on EC2 server and most frequently i get 500 server internal problem . error . I figured it out this happens when number of user increase above 10.Could anyone please suggest which server to host is best for RoR ? As i googled , i got number of

[Rails] Re: record saving problem

2009-08-27 Thread Difei Zhao
Greg Donald wrote: On Wed, Aug 26, 2009 at 11:21 AM, Rob Biedenharnr...@agileconsultingllc.com wrote: Actually, there's no need to nil the id because you can't mass-assign the id. b = B.new(a.attributes) would have exactly the same effect. I have 47 models with matching history models

[Rails] automating online banking login checking for new transactions - what's best approach? (e.g. which gems/libraries etc)

2009-08-27 Thread greghauptmann
Hi, I'm interested in automating online banking login checking for new transactions - what's best approach? (e.g. which gems/libraries etc) Anyone already built something that does this? For example login each hour and check for any new credit card transactions and then email them to myself if

[Rails] Re: Open flash chart

2009-08-27 Thread seja
Thanks Robert, Now open flash is working very fine, but in firefox i want to take print where i getting only blank page only. Any Idea... Same way is possible to save this flash report as an image. Thanks in Advance On Aug 25, 8:37 pm, Robert Walker rails-mailing-l...@andreas-s.net wrote:

[Rails] Re: Forcing a DB transaction to go through

2009-08-27 Thread Aldric Giacomoni
E. Litwin wrote: Well, when I try to view the report, I get one of two behaviors. Ignore the lack of 'a', it's a bug with the console I use (yay Windows). To fix that Windows issue with a not showing, follow the instructions here: http://codesnippets.joyent.com/posts/show/414 Thanks! On

[Rails] Re: Help - Status: 500 Internal Server Error unknown error

2009-08-27 Thread Aldric Giacomoni
There is some issue with sqlite3 on your machine. Is the DLL available to Ruby? -- 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

[Rails] Re: who is Why? And why he disappeared?

2009-08-27 Thread Aldric Giacomoni
Sijo Kg wrote: Hi Have you read this? http://www.globalnerdy.com/2009/08/20/how-and-where-is-_why/ Why this person vanished?Anyone knows? And actually who is he? Why did he do that? Please share your thoughts Sijo http://www.ruby-forum.com/topic/193761

[Rails] Re: Deleting table data from staging table

2009-08-27 Thread John Mcleod
Colin, I used the array approach and it worked. Like this... @import = Import.find(:all) @import.each { |i| i.destroy } Thanks for the input. John Colin Law wrote: 2009/8/26 John Mcleod rails-mailing-l...@andreas-s.net: I have this: imports_controller: def process_csv    # First

[Rails] Setting @request.env[HTTP_REFERER] in an integration test

2009-08-27 Thread Jarl Friis
Hi. I would like to set @request.env[HTTP_REFERER] in an integration test, but due to its nature, I would naturally set this value to the previousle request url. How do I do that. Thanks. Jarl --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: Help - Status: 500 Internal Server Error unknown error

2009-08-27 Thread Colin Law
2009/8/26 mgpowers gmichae...@hotmail.com: no there is no db defined ...I just installed rails and created a simple rails app but can get app environment from main web page or hit my controller properly Rails assumes that there will be a database unless you explicitly tell it there is not

[Rails] Re: JRuby vs Ruby: why would you ever use ruby?

2009-08-27 Thread Gianluca Tessarolo
Sorry, I still can't understand how to run rails in thread safe mode under JRuby (one running instance supporting multiple concurrent requests). If I try to enable config.threadsafe! in config/environments/production.rb under Glassfish Gem my Rails application still run single threaded. Here

[Rails] How to refactor the following 2 function (4 lines each)

2009-08-27 Thread Axinte Logo
Hello I'm trying to DRY my code and I think It could be done even better. The following 2 functions are before_save callbacks that practically do the same thing, but on a different set of attributes. Since the code is highly similar, I was wondering if someone could help me to refactor the code?

[Rails] Re: How to refactor the following 2 function (4 lines each)

2009-08-27 Thread Maurício Linhares
def normalize(property) result = normalize_generic(self.send(property)) self.send(#{property}_min=, result[:min]) self.send(#{property}_max=, result[:max]) self.send(#{property}=, result[:display]) end object.normalize(:size) object.normalize(:budget) - Maurício Linhares

[Rails] Re: How to refactor the following 2 function (4 lines each)

2009-08-27 Thread Gianluca Tessarolo
Hi, try this: def normalize update_result(budget) update_result(size) end def update_result(field_name) result = normalize_generic(self.send(field_name)) eval(self.#{field_name}_min = result[:min]) eval(self.#{field_name}_max = result[:max])

[Rails] Re: Stored Procedures MYSQL and Rails 2.3.2

2009-08-27 Thread Chris Dekker
Adding the 65536 flag seems to allow me to gather a resultset from the stored procedure, yet my commands go out of sync. Running any query (even a simple Model.first) after running a Stored Proc that returns results gives this error: ActiveRecord::StatementInvalid: Mysql::Error: Commands out

[Rails] Do a set of records have the same value for one of the fields?

2009-08-27 Thread Patrick Doyle
Hi Folks, I'm looking for an elegant Ruby one-liner... I have a set of records in my database that I want to check to see if the :description field is identical. And, because it's Thursday morning (where I live), I would like to do it as elegantly and as one-line-er-ly as I can Something

[Rails] Re: Do a set of records have the same value for one of the fields?

2009-08-27 Thread Frederick Cheung
On 27 Aug 2009, at 15:09, Patrick Doyle wrote: Hi Folks, I'm looking for an elegant Ruby one-liner... I have a set of records in my database that I want to check to see if the :description field is identical. And, because it's Thursday morning (where I live), I would like to do it as

[Rails] Re: How to refactor the following 2 function (4 lines each)

2009-08-27 Thread Axinte Logo
Thank you both for your feedback. Based on your suggestions, I've finally decided to implement it in the following way: %w[size budget].each do |property| define_method(normalize_#{property}_range) do |*args| result = normalize_generic_range(self.send(property))

[Rails] Re: Setting @request.env[HTTP_REFERER] in an integration test

2009-08-27 Thread David Angga
you can do it like this: @headers ||= {} @headers[HTTP_REFERER] = previous_link_url get/put/post some_link_url, nil, @headers hope this would help you. thanks. On Thu, Aug 27, 2009 at 8:02 PM, Jarl Friis j...@gavia.dk wrote: Hi. I would like to set @request.env[HTTP_REFERER] in an

[Rails] How to Generate Tags from Description (input)?

2009-08-27 Thread Rails List
My users provide some description ( TEXT field) and I would like to generate tags automatically from them? are there any plugins available?. Any directions would be appreciated. cheers -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received

[Rails] Re: Question regarding routing

2009-08-27 Thread Matt McF
Wouldn't it just be controller_additional_function_path? You can check by running rake routes On Aug 26, 11:08 pm, Dhruva Sagar dhruva.sa...@gmail.com wrote: Hi Everyone, I am developing a small web application using rails, in my controller I have added a function which is apart from the

[Rails] Re: Goldberg

2009-08-27 Thread bill walton
On Wed, 2009-08-26 at 19:12 +0200, Braulio Lima wrote: bill walton wrote: Hi Braulio, On Wed, 2009-08-26 at 13:14 +0200, Braulio Lima wrote: Hi All, Anyone know of any component or plugin like Goldberg? Are you asking about an alternative to this?

[Rails] Re: How to stop a user submitting the same data more than once.

2009-08-27 Thread Aldric Giacomoni
Good to hear that you've solved the problem yourself. Is now too late to point out that you could probably use validates_uniqueness_of in your model? http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#M002167 -- Posted via http://www.ruby-forum.com/.

[Rails] Re: How to refactor the following 2 function (4 lines each)

2009-08-27 Thread Maurício Linhares
Here's a better solution: %w[size budget].each do |property| class_eval %Q! def normalize_#{property}_range result = normalize_generic_range( self.#{property} ) self.#{property}_min = result[:min] self.#{property}_max = result[:max]

[Rails] Re: How to stop a user submitting the same data more than once.

2009-08-27 Thread Matt W.
I have a similar problem that I'm working on, but I was going to take a slightly different approach. My problem is that I'm collecting completely anonymous data at first, but then I want people to be able to come in later and create an account, then hopefully be able to find their records. I'm

[Rails] Re: How to stop a user submitting the same data more than once.

2009-08-27 Thread Kyle F
If you dont want duplicate data then just add the following to the model. Thats where validation should be. validates_uniqueness_of :email_address On Aug 27, 8:43 am, Matt W. m...@squid37.com wrote: I have a similar problem that I'm working on, but I was going to take a slightly different

[Rails] Re: How to Generate Tags from Description (input)?

2009-08-27 Thread Kyle F
Looks like acts_as_taggable_on is what you need. The example included on that page should make it pretty easy to do. http://github.com/mbleigh/acts-as-taggable-on/tree/master On Aug 27, 8:21 am, Rails List rails-mailing-l...@andreas-s.net wrote: My users provide some description ( TEXT

[Rails] routing and has_many

2009-08-27 Thread hansfh
Hi, im a rails newbie, so please be gentle: let's say category habtm products and i've got a product with the id 7. when i use the url /categories/7/products should the server show me only the categories of product 7? On my Server it always shows all categories i have. How do i solve this

[Rails] Re: Picture Slideshow using a database

2009-08-27 Thread Jason Stewart
On Aug 26, 11:32 pm, Tom Dunn rails-mailing-l...@andreas-s.net wrote: On my site, I am having a sort of slideshow in which people can purchase the ability to put a picture on. It's sort of a one shot deal thing, in which someone can go on and navigate to a page that allows them to pick a

[Rails] Re: routing and has_many

2009-08-27 Thread Rob Biedenharn
On Aug 27, 2009, at 8:54 AM, hansfh wrote: Hi, im a rails newbie, so please be gentle: let's say category habtm products and i've got a product with the id 7. when i use the url /categories/7/products should the server show me only the categories of product 7? On my Server it always

[Rails] Re: How to stop a user submitting the same data more than once.

2009-08-27 Thread Jim Burgess
Thanks for the replies. I'm also not sure if doing the validation in the model would work. Assuming that the user has a slow connection and hits submit on the form twice, then the first time the email would be unique, so everything would be good. However, would it not be the case that the

[Rails] Re: How to stop a user submitting the same data more than once.

2009-08-27 Thread Aldric Giacomoni
And maybe one more.. Again, I know you dislike javascript, but.. :) This isn't exactly generic - I'm pulling it straight out of something I'm doing right now. Why not show a spinner (and disable the submit button?) when they press submit and hide the spinner when that's done ? It's all about

[Rails] Re: How to stop a user submitting the same data more than once.

2009-08-27 Thread Matt W.
After talking to some friends of mine, the IP address is NOT a good idea...looks like I'll be looking at a cookie solution instead. On Aug 27, 7:43 am, Matt W. m...@squid37.com wrote: I have a similar problem that I'm working on, but I was going to take a slightly different approach. My

[Rails] Re: How to stop a user submitting the same data more than once.

2009-08-27 Thread Jim Burgess
That's a cool idea. I will also have a play around with that this evening. Thank you very much. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] Re: routing and has_many

2009-08-27 Thread Colin Law
2009/8/27 hansfh i...@strassenfeger.tv: Hi, im a rails newbie, so please be gentle: let's say category habtm products and i've got a product with the id 7. when i use the url /categories/7/products should the server show me only the categories of product 7? On my Server it always

[Rails] Re: Adding New Column

2009-08-27 Thread heimdull
You missed posting the source... Lets have a look at edit and show views On Aug 27, 11:58 am, techtimer frmont...@hotmail.com wrote: I added a new column using a migration. Once I updated the new.html.erb, edit.html.erb, show.html.erb, and the index.html.erb  I brought up my web pages. There

[Rails] NoMethodError with unexpected nil object in ERB

2009-08-27 Thread Ryoichiro Kamiya
I have created original method and trying to pass newly instantiated object to ERB file, but encountering NoMethodError in ERB file with the following error message. --- NoMethodError in Products#lookup Showing

[Rails] problem with links

2009-08-27 Thread RubyonRails_newbie
Hello all... I am on Chapter 4 of RailsSpace and I have hit a problem when it comes to linking in the document. To start with in an earlier chapter I created a page called site.rhtml which used these attributes: %= link_to_unless_current Home, :action= index % | %=

[Rails] partials in innerHTML ?

2009-08-27 Thread RVince
I have a set of javascript functions that are reading json data periodically to create innerHTML in a view. Within that innerHTML, I need to put form(s) based on the structure and content of a row in a table. I am thinking I will just have to somehow hard-code this in html. Perhaps there is a

[Rails] Re: How to refactor the following 2 function (4 lines each)

2009-08-27 Thread Axinte Logo
Mauricio, Thank you again for your help. Is there any difference between your solution and mine? Kind regards, Axinte 2009/8/27 Maurício Linhares linhares.mauri...@gmail.com Here's a better solution: - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr

[Rails] Date precedence validation (ex. Round Trip travel dates)

2009-08-27 Thread Axinte Logo
Hello, I'm trying to validate 2 dates that were provided by the user using a form that wraps a model. I want to do the following 2 validations in the model: validate the date format = That I know how to do! if the format validation was a success, then ensure that date1 is smaller or

[Rails] Re: Asserting PUT methods

2009-08-27 Thread Jason Stewart
On Aug 27, 7:26 am, Jarl Friis j...@gavia.dk wrote: Hi. In my view I have a line like this: link_to('Update timestamp', order_path(@order, :update_timestamp = true), :method = :put This generates HTML like this a href=/orders/2131771394?update_timestamp=true onclick=var f =

[Rails] render :partial erroring with wrong extension

2009-08-27 Thread Eric
I'm thinking that for some reason Rails isn't seeing a content_type so is falling back to .erb rather than using .html.erb, but I can't figure out how this would happen or why it's not able to find the correct file. I encountered this when changing this view from %= render @gigs %, which finds

[Rails] any plugin for admin related tasks

2009-08-27 Thread Rukku Bala
I am creating a web app with ruby on rails. I have a user account database and looking for any plugin that i can use to do standard admin tasks like. 1. scrubbing the database to look for expiring accounts and send notifications. 2. generate newly added users per day etc. Any plugin that can do

[Rails] rake db:test:clone_structure and related tasks fail

2009-08-27 Thread Thomas Allen
Judging by the exception's location, the test environment config is not getting loaded. Do I need to do something else to activate this environment? 341 case abcs[test][adapter] 342when mysql 343 ActiveRecord::Base.establish_connection(:test) 344

[Rails] Re: Do a set of records have the same value for one of the fields?

2009-08-27 Thread Patrick Doyle
records.map(:description).all?(:==) nice... I was trying to figure out something with #inject/#sum, but that looks great. --wpd --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

[Rails] adding hashes to array: bad value

2009-08-27 Thread Aldo Italo
hi, i want to implemnt a system for display recurrent events, i startly with a embrional code: # on my DB i have 1 record: { :title = example, :repeat_day = 4 } # on my controller: @repetitions = Recurrent.find(:all) # on my view: @new_object = [] start_date =

[Rails] Re: NoMethodError with unexpected nil object in ERB

2009-08-27 Thread Frederick Cheung
On Aug 27, 5:32 pm, Ryoichiro Kamiya rails-mailing-l...@andreas- s.net wrote: When viewing @product variable by running this flow in Aptana debug mode and stop it at erb source code, @product seems to have information and not nil (See attached). I was trying to copy standard rails

[Rails] Re: problem with links

2009-08-27 Thread JL Smith
The user controller needs to have the register action. Also run rake:routes to make sure you've got wired correctly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group,

[Rails] Adding New Column

2009-08-27 Thread techtimer
I added a new column using a migration. Once I updated the new.html.erb, edit.html.erb, show.html.erb, and the index.html.erb I brought up my web pages. There was a field to update show. I tried the update and the it was successful but the update did not show up in any of the other pages. What

[Rails] Re: Redirect to domain from subdomain

2009-08-27 Thread Matt Jones
This is mostly about Apache (or equivalent) settings higher up than .htaccess - look around for documents regarding name-based virtual hosting. It's quite possible to set up - pretty much every shared webhost out there is doing it. --Matt Jones On Aug 26, 2:58 am, Abhishek shukla

[Rails] Re: How to refactor the following 2 function (4 lines each)

2009-08-27 Thread Maurício Linhares
Yes, you're defining and method and using send at every call, my solution will generate a method with direct calls instead of sending them. - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Thu, Aug 27, 2009 at 5:24 PM, Axinte Logoal...@evo-green.fr wrote:

[Rails] Re: problem with links

2009-08-27 Thread Colin Law
2009/8/27 RubyonRails_newbie craigwest...@googlemail.com: Hello all... I am on Chapter 4 of RailsSpace and I have hit a problem when it comes to linking in the document. To start with in an earlier chapter I created a page called site.rhtml which used these attributes: %=

[Rails] Re: Deployment Question

2009-08-27 Thread tashfeen.ekram
OK sounds good. So, I imagine one will have to port the data over to the new server. It just seems like there might be some loss of data if the time takes too long between swithcing. i guess we cross the bridge when it comes. On Aug 26, 5:23 pm, John Yerhot joyer...@gmail.com wrote: I wouldn't

[Rails] Re: Adding New Column

2009-08-27 Thread techtimer
The table I am working with is contacts. The new column is type. I changed the edit.html.erb source by adding. p %= f.label :type %br / %= f.text_field :type % /p In the show.html.erb I added p bType:/b %=h @contact.type %. /p What else do I need to post the source... On Aug 27,

[Rails] Re: Adding New Column

2009-08-27 Thread techtimer
Sorry, I didn't understand what you meant by post your code. I snapped, finally. Here it is. Thanks for your help. Again the table is contacts and the field I added is type. edt.html.erb h1Editing contact/h1 % form_for(@contact) do |f| % %= f.error_messages % p %= f.label :user_id %br

[Rails] Re: How to stop a user submitting the same data more than once.

2009-08-27 Thread Matt Jones
The problem is that your users, like most users, are not very bright. They double-click (or in this case, triple-click) submit buttons. :disable_with will pretty much solve the issue; anybody with enough savvy to have JS disabled likely knows that you don't double- click submit buttons. --Matt

[Rails] Re: How to Generate Tags from Description (input)?

2009-08-27 Thread Rails List
Kyle F wrote: Looks like acts_as_taggable_on is what you need. The example included on that page should make it pretty easy to do. http://github.com/mbleigh/acts-as-taggable-on/tree/master On Aug 27, 8:21�am, Rails List rails-mailing-l...@andreas-s.net Thanks Kyle, unfortunately there

[Rails] Re: problem with links

2009-08-27 Thread RubyonRails_newbie
Do you know how that is achieved? I was assuming the page (application.rhtml) is used as the template for the whole site, so wasn't expecting to have to configure the links throughout the site. I'm new to this, so it's probably easy - but i'm maybe looking at it from the wrong angle. So - if

[Rails] plugin for running a timer based application

2009-08-27 Thread Rukku Bala
Hi, I am trying to achieve the following.. wondering if there is any way to achieve this.. Some background: 1. i have an application where the user can request an specific email to be sent at a scheduled time. For e.g. lets say user A wants is scheudling the email to be sent for 12:00pm. This

[Rails] mbleigh / acts-as-taggable-on migration error for MySQL

2009-08-27 Thread Pavan Kulkarni
Hi, I installed acts-as-taggable-on plugin and generated acts_as_taggable_on_migration (Mac OS X, Rails 2.3.3, MySQL). The migration generated has t.column :taggable_id, :integer t.column :tagger_id, :integer MySQL complains when rails tries create FOREIGN KEY (taggable_id) REFERENCES taggables

[Rails] Re: problem with links

2009-08-27 Thread RubyonRails_newbie
cheers for the notes.. I found it eventually. Updated to: %= link_to_unless_current Home, :action = index, :controller = site % | this seems to work now... (phew!) cheers On 27 Aug, 22:25, JL Smith autige...@gmail.com wrote: Oh, and the links you posted in the first post don't specify a

[Rails] Re: Another NoMethodError

2009-08-27 Thread Ar Chron
The foo you Foo'ed is not the foo you think you Foo'ed... In other words, you'll have to show the Bar code that created that pseudo-Foo before we can help. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: Date precedence validation (ex. Round Trip travel dates)

2009-08-27 Thread Colin Law
2009/8/27 Axinte Logo al...@evo-green.fr: Hello, I'm trying to validate 2 dates that were provided by the user using a form that wraps a model. I want to do the following 2 validations in the model: validate the date format   = That I know how to do! if the format validation was a

[Rails] Re: Anything but Aptana

2009-08-27 Thread Walter McGinnis
If you are interested in using emacs with Rails and Ruby, it's probably worth looking at Rinari, too: http://rinari.rubyforge.org/ Also, check out the various emacs-starter-kits and dotfiles on github: http://github.com/search?q=emacs-starter-kitstype=Everythingrepo=langOverride=start_value=1

[Rails] Re: Date precedence validation (ex. Round Trip travel dates)

2009-08-27 Thread Patrick Doyle
Why not convert each date to Ruby Time objects and compare those? --wpd --~--~-~--~~~---~--~~ 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: problem with links

2009-08-27 Thread JL Smith
Oh, and the links you posted in the first post don't specify a controller so it assumes those actions all belong to the current controller which obviously is not the case...so you need to add the site controller to the links: %= link_to_unless_current Help, :controller = 'site', :action = 'help'

[Rails] JQuery + Rails problem retreiving JSON

2009-08-27 Thread lpdahito
Hi guys, I have a problem retrieving data in JSON format using Ajax with JQuery. Here's the code I use: /app/controllers/stories_controller.rb: def index @stories = Story.all respond_to do |format| format.html # index.html.erb format.xml { render :xml = @stories }

[Rails] Re: Adding New Column

2009-08-27 Thread Bashar
I think the problem is with the name of the column, :type. It's a reserved. I read there is a way to use it, but I say it's really not worth it. Try dropping the column and adding it with different name. Should work. On Aug 27, 11:16 pm, techtimer frmont...@hotmail.com wrote: The table I am

[Rails] Re: Adding New Column

2009-08-27 Thread techtimer
Thank you. I removed type and created a new field. Everything is working great thanks for your help. On Aug 27, 4:33 pm, Bashar bashar.abdul...@gmail.com wrote: I think the problem is with the name of the column, :type. It's a reserved. I read there is a way to use it, but I say it's really

[Rails] Re: How to Generate Tags from Description (input)?

2009-08-27 Thread gilmae
2009/8/28 Rails List rails-mailing-l...@andreas-s.net: Kyle F wrote: Looks like acts_as_taggable_on is what you need.  The example included on that page should make it pretty easy to do. http://github.com/mbleigh/acts-as-taggable-on/tree/master On Aug 27, 8:21�am, Rails List

[Rails] Re: Best approach to providing app congurations?

2009-08-27 Thread James West
Matt Harrison wrote: I have no idea if this is the best method by any means, but I have used it before with no problems: I created a model called AppConfig which had an id, a key and a value. I could set the key to the name of the configuration (such as allow_new_signups) and then set

[Rails] Why can't I post in the JRuby mailing list?

2009-08-27 Thread AlwaysCharging
Man I know this is in the wrong forum, so first let me apologize. However, I can't figure out why I am unable to post in the JRuby google group. I have tried on two separate occasions (12 hours apart) and it's now approaching 12 hours since my last attempt. What am I doing wrong? I think