similar to: counting rows via associations

Displaying 20 results from an estimated 10000 matches similar to: "counting rows via associations"

2006 Jan 06
8
How do I write a generator?
I''d like to take some advice and write a generator to change the scaffold.css. How do I do that? I looked on the wiki and googled it but have not found anything yet. Any help would be much appreciated. bruce
2006 Jan 04
10
Is Webrick good enough?
Hi all, On the rails list I''ve seen that it''s hard to integrate Rails with Apache (especially apache2), that it''s hard to change the default port (3000), and that Apache runs Rails stuff slowly. Is it reasonable to run Rails stuff on Webrick while simultaneously running other stuff on Apache? How does one simultaneously run two rails applications on Webrick, when
2005 Dec 31
6
I don''t even know how to ask the question (4 lines of code)
I create a hash using this line of code @x = Account.find(:all) I then want to go through each element in turn and add a key value pair to the end of it. I thought this would work, but it does not. @x.each do |a| a.merge({"balance"=>50} I used merge because I thought ''a'' would be a hash (how do you find out the type of an object?) I then guess it was
2006 Jan 19
3
A book we may wish to buy
Hi: Some French fellow posted a notice yesterday about a book that had come out. It''s called "Ruby on Rails" and is apparently by DHH & David Thomas. Is this a scam? If not, does anyone know where I can buy this book in English? I''ve searched the usual places but can''t turn anything up. Bruce
2006 Jan 02
5
How can one use GRUFF with locomotive ( I guess there is a wider question here, also)
Hi: I love Locomotive and use it exclusively for my rails projects. I''d like to install GRUFF and give it a try (a graph image creation package). I know I can do sudo gem install gruff from the command line for normal ruby and rails. How do I make gems available to Locomotive? bruce
2005 Dec 24
2
Trying to grasp the difference between local variables and instance variables/
Hi: Would it be fair to say (or completely out to lunch) that a local variable is local to a method and an instance variable is local to an object. Thus an instance variable is a sort of limited global variable or super-powered local variable. Its scope is larger than a local but smaller than a global. Or that it is a global within a limited domain (the object). or is it a whole lot
2006 Jan 22
3
dumping out mysql data only (no structure)
Is it possible? It is mentioned in AWDWR but I cannot find that option in the MySQL documentation. I can dump the whole db or just the structure, but I''d like to be able to dump just the contents. bruce
2006 Jan 26
2
Run fastcgi in Apache 1.3, or proxy through lighttpd?
I''m working with a guy who has Apache 1.3 installed on his server, and it''s not an option to simply use lighttpd for a Rails application I''m helping him with. I''ve seen that Apache 2 apparently is crappy when it comes to fastcgi, but 1.3 isn''t so bad. I can then either just run my app straight in Apache, or I could proxy it through to lighttpd. Which
2006 Jan 05
7
repost - Can one edit the file that generates the scaffolding.css?
I am reposting this because not only am I VERY interested in the answer but because I think it would also be useful to many, many people. We kind of have a house-style here, so it would be nice if the generated scaffold.css would accommodate that. My questions are? Is it possible? Is it safe? How? bruce
2006 Jan 01
11
Can rails make use of accesskeys?
I added :accesskey=>"D" to the html options hash of my link_to tag but nothing happened. Should I keep trying or is this not an option yet? bruce
2006 Jan 30
4
What is supposed to happen when you run dispatch.fcgi?
I''ve seen a number of posts where someone says, "What happens if you just run dispatch.fcgi directly?" Every time I do it, I get a "500: internal server error" message. I was just curious if that''s what''s expected running it directly. I assume so, because my apps all work fine, but that''s always bugged me. Pat
2006 Feb 24
4
Rails Newbie Forum?
Hi all. I''m a new convert (or at least I want to be a convert) to Rails. I''ve got the book, have read it, done bits and pieces of the demo, and tried to apply it to a rather complicated DB I''ve got here. I''ve got a ton of questions, and before I bore everyone here, is there a dedicated forum for Rails newbies to get help? Yak -- Posted via
2006 Jan 28
3
App running fine on Webrick, ActiveRecord::ConnectionNotEstablished in lighttpd
My app runs fine on webrick, but I get a ActiveRecord::ConnectionNotEstablished when I try to run it on lighttpd. Here''s the app''s lighttpd config: $HTTP["host"] =~ "(www\.)?mysite\.com" { server.document-root = "/home/pergesuteore/public/" server.error-handler-404 = "/dispatch.fcgi" fastcgi.server = ( ".fcgi" => (
2006 Jan 08
1
How to insert snippets in textmate from the keyboard
I see an abbreviation in the menu called lia but how do I make it work. I have tried a fascinatingly large number of possibilities without success. I have searched the help file and googled the issue. bruce
2005 Dec 11
62
PROPOSAL: The list needs to fork (desperately).
I''d like to propsoe that the RubyOnRails mailing list forks into three lists. PROBLEM: * The list is getting swamped with traffic, making it hard to use and even harder to follow. * Many, many messages get lost, with no reply. * Due to the overwhelming traffic, it''s hard for beginners to get the help that they need, since their messages get lost in the shuffle, and
2006 Jan 04
1
I''d like to edit the scaffolding file - is it possible?
I notice that I begin each project with a standard css file which is the one produced by scaffolding PLUS some other stuff. I could cut and paste a copy from an old project but I thought it would be "cooler" amongst other things (like more efficient) to just have the scaffold.css file be created for me. Is it possible? Is it safe(ish), What would I have to do? Thanks in
2006 Feb 24
8
Ruby site structure on Apache
I use a hosting company,it use appache for RoR I test a ''hello word'' code here http://www.smtservers.com/demo/ I can see the working code here http://www.smtservers.com/demo/public/say/hello My question is how to short the url like http://www.smtservers.com/demo/say/hello.I do not like public always in URL Thanks for help Mark -- Posted via http://www.ruby-forum.com/.
2006 Mar 14
8
The RoR equivalent of out.write() in JSP?
All, In JSP, I can output strings in the Web page by either <%= foo %> //foo is a string or returns a string or <% out.write("test") %> //write directly to the output stream. What is the method of "writing to the output stream" in RoR? Basically, what is the equivalent of out.write()? I have an if then statement that I want to put around a call to h
2006 Jan 30
14
RoR admin system
I''m preety new at RoR (and programming), I tried a few tutorials, and really like the RoR simplicity, but my knowledge of the framework still isn''t very good (to be true, i understand the basics, but not everything that''s in the tutorials). But still I''d like to create a website which has: - front end interface (with no edit functions) - admin interface
2006 Feb 04
1
Can I reset the cycle helper?
Hi: I have lines in a table I wish to stripe BUT, every now and then there is another type of line, a section header line. I''d like to be able to start the line after a section heading always as one of the two classes the cycle helper is cycling between. Is it possible? If so, how? bruce PS. I realise I could do this with ''odd_or_even'' or the %2 method (mod