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....

You need a treatment program for that coke problem ;)

> Are you seriously saying those examples are remotely useful or time saving?

No. I was responding to your comment

'It does lots of stuff for you...right up until it needs to something different
then the default...then you are right back writing custom code to make your
"something different" work.'

Those are a couple examples of "something different" than what Rails
expects (well, ActiveRecord to be specific, but that's a detail)

> 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).

Rails is the framework. Ruby is the language.

You want to check that startDate is less than endDate? You need Ruby.
Rails just makes it easy to implement in a web app.

<code>if startDate<endDate
</code>

want to check that it's in between two dates?

<code>if someDate.between?(startDate,endDate)<code>

Now to roll that into the Rails framework

class myClass < ActiveRecord::Base
  def validate
    unless startDate<endDate
      errors.add("Start date must be less than end date")
  end
end

Use it a lot, turn it into a helper and you've got it for any class
you want to mix it into.

But that's just some trivial validation....

> Prove me wrong...show me something amazing!! ;-)  I'm all for learnig a new 
> tool
> IF it's worth my time.

Just in ActiveRecord alone, a short list would be aggregation,
single-table inheritance and all the acts_as_tree and acts_as_list.

Of course, I think it's pretty great that unit, functional, and
performance testing is built right in. And so on and so on.

As I've said in an earlier post in this thread, the real value is the
whole package that works together -- similar things can be done in CF
for the most part. And you can do pretty much exactly the Rails thing
in Django if you'd rather use Python :)

--
John Paul Ashenfelter
CTO/Transitionpoint
(blog) http://www.ashenfelter.com
(email) [EMAIL PROTECTED]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238239
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