similar to: Rails Best Practice - NestedIterators

Displaying 20 results from an estimated 20000 matches similar to: "Rails Best Practice - NestedIterators"

2010 Jan 07
0
flyerhzm-metric_fu = metric_fu + rails_best_practices
I have forked metric_fu and add rails_best_practices to it. rails_best_practices is a great gem to check your rails app codes and give you some good suggestions for better rails codes. The repository of flyerhzm-metric_fu is here: http://github.com/flyerhzm/metric_fu The repository of rails_best_practices is here: http://github.com/flyerhzm/rails_best_practices -- You received this message
2008 Sep 19
0
metric_fu for use in cc.rb
Hi all, I looked on the mailing list for metric_fu, but didn''t find it -- so at the risk of being redundant, it looks really useful. "Metric_fu is a set of rake tasks that make it easy to generate metrics reports. It uses Saikuro <http://saikuro.rubyforge.org/>, Flog<http://ruby.sadi.st/Flog.html>, Rcov <http://eigenclass.org/hiki.rb?rcov>,
2008 Jun 10
1
Refactoring''s code needs refactoring''s specs?
Hi guys, I have one question: When refactoring the working code I need or should refactoring the specs too? My old code is: http://pastie.org/private/gpskgtavm4yzutanq1ro3w My new refactored code: http://pastie.org/private/2emgi1hr5iga3m9jib4q and the specs that are still passing without refactoring: http://pastie.org/private/qn3uaoin0k2n8vjsusssg Regards. -- "Most of you are
2009 Sep 15
3
how to run all tests AND metric_fu
i want to use cruisecontrol.rb to run ?rake test? (every time a new revision is in the svn repo) and ?rake metrics:all? (let?s say every 24 hours). how do i have to configure cruisecontrol.rb? both rake tasks work. however, when i configure cruisecontrol.rb as described on the metric_fu website, i.e. add ''project.rake_task = ?metrics:all? project.scheduler.polling_interval =
2011 Feb 19
1
undefined method `map' for nil:NilClass for rails 2.3.2
Hai guys! When i try to do rake gems:install and rake gems:refresh_specs in my app below error is occurred. please give some solution for this. config.gem: Unpacked gem authlogic-2.1.3 in vendor/gems has no specification file. Run ''rake gems:refresh_specs'' to fix this. rake aborted! undefined method `map'' for nil:NilClass enivorment.rb RAILS_GEM_VERSION =
2010 Mar 18
2
CCrb configuration for many projects
Hi! I have about 10 projects in my Cruise. I want to use metric_fu (roodi, rcov, flay) metrics. Right now I have defined :cruise task in Rakefile in each project. Is there any convention to manage cruise configuration from one place? Gem? Plugin for Rails projects? Some good habit also for custom artifacts? -- Pozdrawiam, Sebastian Nowak http://blog.sebastiannowak.net XMPP: seban at chrome.pl
2006 Dec 24
6
What do you think of this controller spec?
Here''s a controller spec I wrote, it''s for a very simple RESTful controller (well, aren''t all RESTful controllers simple? :) I''ve created a couple spec helper methods to refactor some of the common code...for example, require_login_and_correct_user creates two specifications: one for when the user isn''t logged in, and one when the user is logged in but
2010 Jul 19
6
Setting a root_url
I know how to setup a roo_url using map.root in "routes.rb". The issue I''m currently having is as follows: I walking through this Rails cast regarding Authlogic: http://railscasts.com/episodes/160-authlogic I decided that I make my map.root the "login" page, that is, the index.html.erb of the user_sessions_controller. So, what I did is typed the following in the
2007 Sep 14
4
Refactoring ActiveRecord's private methods
As it currently stands, ActiveRecord has alot of private and protected methods in the Base class. >> ActiveRecord::Base.methods.size => 427 >> ActiveRecord::Base.protected_methods.size => 32 >> ActiveRecord::Base.private_methods.size => 193 I really loved the suggestion by Courtenay in Refactoring AR::Base.find (http://groups.google.com/group/rubyonrails-core/
2012 Feb 23
1
Bug in nested_attributes_for: question about best way to patch
I''ve discovered what I''m pretty confident is unexpected behavior in accepts_nested_attributes_for, and am developing a patch, but I''ve encountered a question about how the core team would prefer the implementation to look. Here''s the bug: when assigning to a belongs_to relationship (and I believe one-to-one, but I haven''t verified yet) if you mark the
2011 Sep 07
0
No upstreams on domU, but downstream works fine
Hi all, I asked about this in the ##xen irc channel a few days ago and had some help, but no luck. The problem is that my dom0 connects fine with WAN, but all domUs do not always connect to external hosts (though they can communicate in the LAN and with the gateway). I''ll try to post as much relevant information as I can think of and what all I have tried I disabled all dom0 and
2008 Nov 29
2
SMTP Mailer is KILLING me
Folks, the first person to figure this one out will make my day. Let''s just say I''ve tried everything for the past few hours, and I''ve become frustrated to the point of forum-posting. So...ready? Here goes... I keep getting this error: "553 This SMTP server requires authorisation. The password you''ve entered is incorrect" ->
2009 Jun 14
5
Partials views and instance variables go nil
Hi everyone! Model: http://pastie.org/511290 Controller: http://pastie.org/511285 View new: http://pastie.org/511286 View _form: http://pastie.org/511284 When I hit submit button there''s an error for usuarios(users in portuguese) instance. It does not seems to save usuarios even though it seems to be posted by the form. Error: http://pastie.org/511292 Need some help here guys plz --
2008 Jun 06
2
Problems with view spec and mocking will_paginate
Hi all, I have some failures that not I don''t understand this the pastie with index.erb.html http://pastie.org/private/zgohh6dcts04wpfagfgz5q and this is the pastie for view''s spec: http://pastie.org/210485 and the failure: 1) ActionView::TemplateError in ''/posts/index.html.erb should render list of posts'' undefined method `count'' for
2010 Nov 15
1
Installing rmagick gem with RVM
Hello, I start using RVM for using Rails 3 and Rails 2 for some applications. At the moment I can''t install the rmagick gem in the new Ruby environment. I use Mac OSX and I installed already imagemagick via ports and this was working before using RVM, I succeed also to install the rmagick gem before installing RVM. Here is the output of the install command : http://pastie.org/1299253
2012 Jun 28
2
Best practice on Javascript and rails
Hi, I get constantly nervy whenever trying to implement any javascript / jquery in rails, basically because I''m not sure where to put things in the project! I know the people at rails have thought long and hard about how to best structure an app, so I''d like to learn the correct way. I''m using rails 3.2, ruby 1.9.3 ///////////// 1st situation - using a gem to include
2010 Aug 22
2
Build failure building dbox and gnutls
Hello! I'm having two issues building dovecot, one is with dbox storage, and another building gnutls as the SSL backend (builds fine with openssl). Software versions are Dovecot v2.0.0, GnuTLS 2.8.6 and OpenSSL 1.0.0a Configure: ./configure --prefix=/usr --sysconfdir=/etc/dovecot --localstatedir=/var --libexecdir=/usr/lib --with-moduledir=/usr/lib/dovecot/modules --with-zlib
2012 Nov 19
2
Dovecot sieve with postfix.
Hi all, I can't get dovecot working with postfix. If I leave virtual_transport set to "virtual", I can send and receive messages just fine in roundcube. If I set virtual_transport to "dovecot", I can only send messages in roundcube, but incoming messages never arrive. Seems I can't get dovecot-lda to work. I need dovecot-lda in order for sieve filters to work. Any
2007 Feb 24
3
Spec failing [Possible Bug with kind_of? and instance_of?]
I have a spec which is failing, but I just can''t say why. Maybe I''m missing something painfully obvious? Here is the pastie of the results & the spec: http://pastie.caboo.se/42626 The spec to look for is "should have an array of users" I''ve printed out ("puts''ed") to the terminal the fact that the values are *opposite* to what
2010 Apr 06
2
How do I initialise
Hi, I''m playing around with module instance variables. I can set one up and initialise it when the module is included in a class. What I can''t work out is how I initialise one when a class inherits another class that includes the module. See http://pastie.org/905720 This creates two classes, the first inherits a module that contains an instance variable. The second inherits the