On 4/19/06, Bryan Stevenson <[EMAIL PROTECTED]> wrote:
>
> > don't like plural table names?
> > ActiveRecord::base.pluralize_table_names=false in environment.rb
> >
> > want to override a table name?
> > class someTable < ActiveRecord::Base
> >  set_table_name "some_crazy_table_name"
> > end
>
> Now that I'm finished blowing Coke out my nose....
>
> Are you seriously saying those examples are remotely useful or time
> saving?
> Those examples have NOTHING to do with custom coding (like my simple
> example I
> posted a couple posts back...start/end date validation...make sure start
> date is
> before end date....RoR will just make sure both dates are dates,...after
> that
> you're back to coding as usual).
>
> Prove me wrong...show me something amazing!! ;-)  I'm all for learnig a
> new tool
> IF it's worth my time.


it's not amazing, but in the model you would add

def validate
  errors.add(:start_date,"should be earlier than  end_date") unless
start_date.nil? || start_date < end_date
end


Cheers
>
> Bryan Stevenson B.Comm.
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> phone: 250.480.0642
> fax: 250.480.1264
> cell: 250.920.8830
> e-mail: [EMAIL PROTECTED]
> web: www.electricedgesystems.com
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238182
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to