search for: programmingruby

Displaying 17 results from an estimated 17 matches for "programmingruby".

2006 Mar 27
3
Enumerable?
Hi, Can anyone please point me to some docs on Enumerable. I can''t seem to find anything on how to use it. Thanx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060327/0825d5e8/attachment-0001.html
2006 Jul 06
3
Calling Method
Is there a way to call a method if I only have a string that contains the method name. For example: @methods = [''method1'', ''method2'', ''method3''] @step = 1 # I want to call method2 which has a definition in this class -- Posted via http://www.ruby-forum.com/.
2006 Apr 06
2
making an integer from a float
Does anybody know how to turn a floating-point number (i.e. 60.345) into an integer by cutting off or rounding the decimal portion? Either method, or both, would be quite welcome. Thanks! This forum rocks! -- Posted via http://www.ruby-forum.com/.
2006 Feb 01
4
Where is the send() function?
Hi, in the tutorial "4 Days on Rails" the following code fragment is used: ,---- | <% for column in Category.content_columns %> | <td><%=h category.send(column.name) %></td> | <% end %> `---- Apparently, the send() function returns the column value by name, but where does this function comes from? Unfortunately, neither the tutorial nor the API
2006 Apr 20
7
checking date
Radrails created a field for date <%= product.date_available.strftime("%y-%m-%d") %> What does this mean? Should the definition be date or datetime? I tried both and no results Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060420/ed0cbb14/attachment.html
2006 Mar 28
11
setting widget attributes
I''m trying to set attributes of widgets in subclasses like the following. class PersonTable < FXTable def initialize(owner) options = TABLE_COL_SIZEABLE super(owner, nil, 0, options) visibleRows = 5 ... end end visibleRows doesn''t get set. However, if I do this self.visibleRows = 5 then it does. Shouldn''t it work without "self."?
2006 Jul 25
3
Saving to_xml to a file
Ok, one more question... I can dump the database to xml by doing User.to_xml I''m wondering if I can save it to a .xml file. I''m having trouble finding documentation on this. Thanks!! -- Posted via http://www.ruby-forum.com/.
2006 Jun 06
4
change 1-06-2006 to 1st July 2006 (date formatting)
Hi, I have a few dates coming from the datebase in the format ''DD-MM-YYYY'' How can I change this in to a more human readable format? such as 1st July 2006 Thanks Scott -- Posted via http://www.ruby-forum.com/.
2006 Oct 13
2
Splitting controller
I''m trying to split controller into several files. I tried extracting methods into separate files and then requiring them in main controller, but this doesn''t seem to work. controllers/reports/sales_reports.rb: class ReportController < ApplicationController def sales end end controllers/reports/purchases_reports.rb: class ReportController < ApplicationController def
2007 Feb 16
13
negate the regexp in validates_format_of
Railsters: ActiveRecord''s validation system puts other database systems to shame. However, the newbies might not know how to write a regexp that excludes a match, instead of tests for it. Understand - I''m just asking this question to help them. I have been using Regexps since ''grep'' on Xenix! But the newbies here might not know how to do this:
2006 Jan 17
14
Going nuts on ''\n'' to <br />
Hi all, Is there no way to easily resolve this. It can''t be that I''m the first that wants this, and it wouldn''t be RoR if it''s not possible. On the mysql prompt with the select description from todos .. linefeeds are show, so they are there. This is the actual contents with a linefeed after the ":" "Project contacts: delete table, point
2006 Apr 15
7
New to rails - scaffold command , how to get related items?
Ahoy, I was able to follow the tutorials and build a simple to-do list program with Items and Categories and have the related tables link up w/ the default "scaffold :Items" command plus custom defenitions. Then I erased all of that and tried rebuilding the program using the ruby script/generate scaffold Item (and category) command. Now the templates look like " <% for
2007 Nov 24
7
htmlwindow
Bonjour. Ne pouvant pas afficher toutes les pages web avec html window, est-ce qu''il est possible à partir d''un bouton de coller l''url choisi dans la barre de recherche d''IE7 par exemple et d''ouvrir IE7 automatiquement à la page recherchée? Est-ce que vous pouvez me donnez quelques explications si cela est possible? merci sebastien
2005 Mar 02
9
date validation
I''m hoping someone can help me (a Rails newbie) with this. Basically, I need to verify that a date created with "date_select" is valid *before* it''s sent off to the database for acceptance (as a valid date) or rejection (as an invalid date). Given how easy the majority of validation are in Rails, I''ve got to believe there''s a fairly simple way
2006 Mar 29
7
Uploading files and writing them to server?
Where should I look for information on how to use Rails and Ruby to accept the upload of a file and then to save that file to the file system of my server? I''m reading the "Uploading a file" section of Agile Web Dev with Rails, but it''s geared toward saving the file in the database. Any advice? Thanks, Jeff -- Posted via http://www.ruby-forum.com/.
2006 Jun 17
8
Application Design
Hey, I have a system that I am trying to design, it contains news articles, events, etc... There is model representing articles, one representing events, etc... Articles or events can be active or inactive, so I can do a query to return all active articles, all articles or all inactive articles. The question that I have is what would be the best way to design this. Right now I have each
2006 Jun 11
47
Ruby on Rails and CakePHP Comparison
>From a development standpoint, what are the features that make Ruby on Rails a better choice compared to CakePHP? -- Posted via http://www.ruby-forum.com/.