On Tue, Mar 26, 2013 at 9:15 AM, Paulo Ribeiro <plribeiro3...@gmail.com> wrote:
>
>
> Em terça-feira, 26 de março de 2013 01h49min23s UTC-3, tamouse escreveu:
>>
>> On Mon, Mar 25, 2013 at 2:51 PM, Paulo Ribeiro <plribe...@gmail.com>
>> wrote:
>> > Em segunda-feira, 25 de março de 2013 14h39min09s UTC-3, Matt Jones
>> > escreveu:
>> >> On Sunday, 24 March 2013 12:59:00 UTC-4, Paulo Ribeiro wrote:
>> >>>
>> >>> Thx for your reply. I want to make the models more light. I want to
>> >>> make
>> >>> models what will only access the database (CRUD), without callbacks
>> >>> and the
>> >>> other stuffs it loads.
>> >>>
>> >>
>> >> Not to be rude, but this is still "what" you want to do.
>> >>
>> >> *Why* are you trying to make the models "light"? Are you working in a
>> >> resource-constrained environment? Splitting off the callback system is
>> >> going
>> >> to break plenty of stuff - for instance, :dependent => :destroy on
>> >> associations is implemented with a callback. Would it be sufficient to
>> >> simply not use features you don't want?
>> >>
>> >> --Matt Jones
>> >>
>> >
>> > Im trying to make my own solution. Instead of working with MVC, im
>> > working
>> > with another patterns as well. And i want ActiveRecord::Base model only
>> > to
>> > interact with the database and nothing else. My business logic is going
>> > inside another models.
>> >
>> > Sorry if i wasn't clear enough before and thanks again for your time. =p
>>
>> If that's the case, maybe you just want to work with the appropriate
>> data base gem/driver directly? (mysql2, sqlite3, postgres, etc)
>
>
> Well, its an option. But i would like the code readbility of the
> active_record methods and some good funcionalities like the finders. Im
> still using rails on my projects, i just want to make sure that if somebody
> that is working on this project too, doesnt use callbacks and stuffs. I want
> the models only to access the database.

If you don't use the callback and stuffs, do they actually get loaded?
I thought ActiveRecord only loaded the stuff that is getting used...

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to