similar to: Enumerable?

Displaying 20 results from an estimated 1000 matches similar to: "Enumerable?"

2006 May 02
4
Bug in rails ?
Hi ! I just have a simple question. I am writing an app using rails to familiarize myself with the framework (which is pretty cool, by the way). I just wanted to know why these two work differently (since "find" should be a synonym for "detect" according to the Pick Axe) : current_item = @invoice.line_items.detect {|i| i.product.id == key} current_item =
2006 May 05
6
rake rails:update
This question has been asked before, but I am still can''t run rake rails:update. I get rake aborted! Don''t know how to build task ''rails:update'' My environment: FC4, Ruby 1.8.4, Rails 1.1 Any idea what to do? -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Apr 27
7
HTML Title
Hi there, If I have an application.rhtml template what''s the best way to set the contents of title element in the html -> head area of the template to something set in the view for action in a controller. I want to just have one template which renders the basic layout for all pages and I''ve been scratching my head over this one for a couple of hours now. Any help
2006 Apr 16
7
Problem running unit tests
I am running Rails 1.1.2 with Ruby 1.82-15. My database is Postgresql. I haven''t had any problems generating models, migrations, using scaffolds, and generally building and using my application, but I haven''t been able to get testing to work. I initially just ignored the problem and kept developing, but would like to add proper testing from here on out. Currently when I type
2006 May 25
3
No joy for newbie Capistrano user
Hello, I tried taking Capistrano out for a test drive and I can''t even get out of the garage. I am following the instructions here: http://manuals.rubyonrails.com/read/chapter/98#page262 As well as Duncan Davidson''s Deploying Rails with Lighty: Deploying Rails with LightTPDhttp://duncandavidson.com/essay/2005/12/railsonlighty Specifically, when I do: rake remote:exec
2006 Feb 15
9
Liquid - form helpers? multiple liquid templates?
Hi, Its taking me a long time to get my head around the Liquid plugin. I have a couple of questions which hopefully someone can help me with... - How difficult would it be to add some kind of Filter or Tag which would allow other Liquid templates to be included into the current Liquid template (eg. similar to render(:file => "filename") - How difficult would it be to add
2006 May 16
2
liquid: passing objects
I''ve got Liquid installed and maybe since I''m not coming in with Django experience, I''m completely mystified by how to pass anything worthwhile to a template. In my controller: def preview @customer = Customer.find(1) @letter = Letter.find(1) @liquid_body = Liquid::Template.parse(@letter.body) @x =
2006 Feb 08
8
Liquid with database?
Hello, Just wondering if someone here as successfully ported Liquid to use with a database. I would like to try it out but not sure how Liquid integrates with current templates. Thanks Frank --------------------------------- Yahoo! Mail - Helps protect you from nasty viruses. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 May 30
11
Another String Manipulation Exercise
Hi guys, And I thought it wasn''t a problem. Here''s my string "/var/www/vhosts/mysite.com/httpdocs/public/file/mypic.jpg" How do i take out all the text that comes before "mypic.jpg"? Trickier than I first thought. TIA, Bing -- Posted via http://www.ruby-forum.com/.
2013 Jan 31
2
CollectionAssociation shadows Enumerable#count
Hi all, I realize this behavior is by design, and in some respects the right thing to do. It also pre-dates the addition of Enumerable#count. I''m wondering, however, if it''s possible/desirable to allow the caller to access the Enumerable versions under certain conditions. I originally wrote the up as an issue, but was informed this would be the better venue. I''m
2006 Jun 28
3
Add to enumerable
This might seem like a really daft question, but I couldn''t find an answer anywhere. How do you add something to an enumerable object? Something like var first = $A(getElementsByTagName(''td'')); var second = $A(getElementsByTagName(''tr'')); first.PUSH(second); where the PUSH is something unknown. am i supposed to use inject here in some way? Andreas
2006 May 24
8
Where to recruit Ruby on Rails developers?
Anyone have suggestions on where to recruit Ruby on Rails developers? My startup''s in Berkeley, CA and I''m looking for a talented technical lead. I''ve tried LinkedIn and Craigslist but the pickings are slim. This project provides an opportunity to use OpenLaszlo. rocky at_sign teampatent dot com -- Posted via http://www.ruby-forum.com/.
2005 Dec 15
10
.rpdf ?
I haven''t delved into the wonderful world of PDF::Writer yet, nor have I run across a need.. but I just had an idea I wanted to throw out there how hard would it be to create a .rpdf template plugin for rails? could be neat ;]
2006 Jan 24
1
Liquid templates and RJS
Does anybody know whether Liquid templates can be combined with RJS ? -- Roberto Saccon - http://rsaccon.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060124/edeafadc/attachment.html
2006 Apr 05
13
scaffold misuse?
Running ruby script/generate scaffold Product Admin is a wonderful way to set up well, exactly what it says, a scaffold. My problem is that I have several other tables that are linked, through foreign keys, to the Product table. Say an "authors" table. Now when I go enter a new product, a book, I want the application to provide a drop down list of authors generated from the records in
2006 Jan 23
4
Enumerable
Hi and sorry if this has already been discussed. I''m new on theese lists, and I couldn''t find a way to search through them. I have been looking at the sources of script.aculo.us and I''m rather impressed by the Enumerable class. What I don''t get is why you choose to extend Array.prototype with this addon. It seems like a rather intrusive thing to do, if the code
2006 Jan 23
3
prototype.js: enumerable mixin for hash broken
Hello everyone. I am not sure if this is the right place to post, please redirect me if there is a mailinglist more specifically dealing with prototype.js. After playing around with the very inspiring prototype library I have found a rather annoying thing, that makes the usefulness of the Enumerable mixin for Hashes questionable, if I am not totally wrong (again :-). Here an example:
2006 Jan 31
2
Liquid templates and forms
I have started to experiment with Liquid templates and all goes fine as long as I just display my stuff. But I want to get user input (using forms), and I couldn''t figure out so far whether and how liquid facilitates the use of forms, something like the form helper tags in .rhtml. Anybody knows about that ? -- Roberto Saccon - http://rsaccon.com -------------- next part --------------
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/.