similar to: DRYing - similar named fields, etc.

Displaying 20 results from an estimated 4000 matches similar to: "DRYing - similar named fields, etc."

2006 Jul 06
5
Single table inheritance
I''m having a class called Person, with subclasses as goalkeeper, forward, defender. Now a person can be a forward as well as a defender or a goalkeeper. I want to use single table inheritance like : class Goalkeepr < Person end And not have multiple boolean columns like in my people table like is is_goalkpeer, is_forward, is_defender. How do I go about it ? Thanks, Pratik -- rm
2006 Jul 15
3
Why app/helpers are not app/view/helpers ?
So that we can write controller code inside helpers ? are we supposed to do that ? -Pratik -- rm -rf / 2>/dev/null - http://null.in "Things do not happen. Things are made to happen." - JFK
2006 Jul 24
6
error_messages_for not working
I have the following code and I am not able to get it working. The error message is not coming on the top, it is just getting displayed on a different page if I dont have the rescue block commented at the bottom. Model: user.rb require "digest/sha1" class User < ActiveRecord::Base validates_presence_of :eaddress, :fname, :passwd, :pcode, :country, :day, :year, :month, :gender,
2006 Jul 20
16
Juggernaut Released - (a.k.a Armageddon)
I''ve just released Juggernaut - a plugin for ruby on rails. Check out the site: http://juggernaut.rubyforge.org I?ve also finished a demo that illustrates some of Juggernuat?s capabilities. You can sign up for an account here: http://alexmaccaw.no-ip.info:3500/login/sign_up . It might be a tad slow as it?s running from my home machine. Juggernaut for Ruby on Rails initiates a flash
2006 Jul 21
9
multi-server rails deployment
I''m building an app in rails that will be deployed on 3 different servers but am not sure the best way to deploy it. The app is something like Google Adwords (an online advertising program, essentially). ServerA is the Administration server ServerB is the Ad server (feeds ad requests to affiliates) ServerC is the Click server (handles incoming clicks from our affiliate sites) All 3
2007 Jul 27
4
Looping through all possible combinations of cases
Hello! I have a regular data frame (DATA) with 10 people and 1 column ('variable'). Its cases are people with names ('a', 'b', 'c', 'd', 'e', 'f', etc.). I would like to write a function that would sum up the values on 'variable' of all possible combinations of people, i.e. 1. I would like to write a loop - in such a way that it
2006 Jun 28
3
Best way to structure this?
I''m thinking of an application in which a user can request for different items (like office stationery). So, I have a table of users and a table of requests. The thing is that depending on the item requested, the parameters are different - for example, pens may have {colour, width, type} while paper may have parameters such as {colour, size (A4, letter, legal), stack size,
2008 Jun 11
5
Similar words
Is there a way to get a list of similar words to the ones a user has searched for? So if they search for (in my case) transferaze which has no matches I can get back an array like this [''transferase''] ? I know I can just add ~ on the end to make it fuzzy, but what I''d like is to be able to say "Sorry, no matches for ''transferaze''. Did you
2006 Jun 25
6
Understanding Common Views
Hi Everyone, I''m trying to formulate my thoughts on how views work in RoR and I understand the basic bits - 1. Every controller has its own view defined using rhtml files in the views/[controller_name] folder. 2. There is one "view" file (rhtml) for every in the controller and has the same name as the method. 3. For portions that are common, partials can be used - file
2006 Jul 21
3
Interface with Flickr
Does anyone know how to get going with the flickr api WITHOUT using the ''flickr.rb'' gem? I''m wanting to just use the REXML and ''net/http'' stuff. I''m just wondering how to send requests to the api and handle the response. Any tips would be great! Thanks! -- Posted via http://www.ruby-forum.com/.
2006 Jul 17
3
ROR and MogileFS
I am an engg student looking for project related to ruby and MogileFS... Can anybody suggest me about - use of ruby and MogileFS in application developement regarding - 1.is it efficient enough? 2.any alternate solution available for this? 3.any improvements that are required in MogileFS ? 4.and should i go for it? thank you.. -- Posted via http://www.ruby-forum.com/.
2007 Jun 28
23
DRYing link_to with a symbol
Hi, I just put in a patch that allows you to DRY up this: <%= link_to @company.name, @company %> to this: <%= link_to :name, @company %> The symbol indicates the method to be called on the object passed in the link_to options. http://dev.rubyonrails.org/ticket/8789 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the
2006 Jul 05
4
Rails Web Hosting?
Hi, Where can I find Rails web hosting? I wish to get a domain name + web hosting. Kind Regards, Lennie De Villiers OpenMind Connections Website: HYPERLINK "http://www.openmindconnections.co.za/"www.openmindconnections.co.za Win-Ads: HYPERLINK "http://www.win-ads.co.za/"www.win-ads.co.za ? Online Advertisement Coming Soon! -- No virus found in this
2006 Jul 27
3
Subversion library for RoR
Hi everybody, Is there a gem or something for working directly with Subversion from a RoR app? Thanks, Tiffani A.B. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060727/26846e72/attachment-0001.html
2006 Oct 11
7
(re-send) FAQ?
Hi Everyone, I''m resending this since it did not come back to me (and no replies either), so I think it may not have got through at all. Apologies if you receive multiple copies. Is there a FAQ for this list? Is someone considering setting one up? Perhaps as a collaborative wiki that is kept roughly current and can be referred to directly by list members... Here are some of the
2006 Jul 04
11
Any CMS for Ruby on Rails..
Well i want to make a photography community site on the lines of www.gfxartist.com , www.terminus1525.ca, www.phirebrush.com Where the community votes for every subbmission from a artist and can comment (like a forum).. Now gfxartist has used probably SMARTY,php,and their own CMS. terminus used Drupal,Gallery 2.Some one tells me that this combo is heavy on resources and slows down sites.
2007 Apr 10
5
newbie :: Convert integer to string in Ruby
Hi all, Please anybody tell me how to Convert integer to string in Ruby and concat it. Suppose I''ve a string "ABC" , I want to concat it with a number say "ABC12" . Please help me out. Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post
2007 Sep 25
21
form_for and partials
I love form_for, but I really hate <% form_for :person, @person, :url => {...} do |f| %> ... <%= render :partial => ''form'', :locals => {''f'' => f} ... <% end %> I''ve been thinking of instead allowing <% form_for :person, @person, :url => {...} do |f| %> ... <%= f.partial ''form''
2005 Apr 03
3
is there a function like %in% for characters?
like: "a" %in% "abcd" TRUE Thanks.
2009 Apr 13
1
should sub(perl=TRUE) also handle \E in replacement, to complement \U and \L?
Currently sub(perl=TRUE) allows you to specify \U and \L in the replacement argument so that the rest of the subpatterns in the line (the \\<digit> things) will be converted to upper or lower case, respectively. perl also also has a \E operator to end these case conversions for the rest of the subpatterns (so they retain whatever case they had in the original text). For symmetry's sake