On Saturday, March 3, 2012 11:14:08 AM UTC-5, Rodrigo Rosenfeld Rosas wrote:
>
>  Em 03-03-2012 12:41, Mark Peterson escreveu: 
>
> On Saturday, March 3, 2012 9:23:16 AM UTC-5, Rodrigo Rosenfeld Rosas 
> wrote: 
>>
>> Given the code below, it seems you're just starting using Rails and you 
>> still don't understand Rails basic concepts. 
>>
>> Shouldn't you consider posting in the user's mailing list first? It's 
>> more likely that you'll get better advices there than here...
>>
>> After you get used to Rails, if you still have questions about how Rails 
>> should do things, then your questions will be better discussed here.
>>
>> Cheers,
>> Rodrigo.
>>
>
> Are you referring to my complete and utter lack of syntactic sugar? 
> It almost seems as though I deliberately avoid the stuff completely :)
>  
>
> Please don't remove text from the threads. Not everyone reads them in 
> Gmail and it makes it really hard to read the messages in an e-mail client, 
> like Thunderbird.
>
> ---
> class User < ActiveResource::Base 
>   self.site = "http://localhost:9000"; <http://localhost:9000> 
> end"
> ---
>
> I don't call this "lack of syntactic sugar". This is completely wrong Ruby 
> code and makes me feel that you don't know Ruby enough. Please, post the 
> full code as it is actually easier to read the code with all its "syntactic 
> sugar".
>
>  This might be the wrong forum, but I'm sure that ActiveResource team are 
> happy that I proofed the issue.
>
> As an expert core member Rodrigo, do you know the alternative to this line?
> Dir.glob("#{Rails.root}/app/models/*.rb").sort.each { |file| 
> require_dependency file }
>  
>
> I'm not a Rails core member, nor even an expert in Rails. And I don't know 
> why you need this. Shouldn't Rails be automatically loading those files? 
> Why should they be loaded in any particular order?
>
> Cheers,
> Rodrigo.
>

This is as full as I need my User.rb model to be, in practice and for the 
proof on this thread. Lord praise the fat model, which is encapsulated 
nicely inside of ActiveResource and ActiveModel.

Common sense advice: When determining how fat your model is, also consider 
the classes/modules from which your model inherits. 

You don't have to add unnecessary filler code to your model to make it 
fatter than the controller from which it is invoked. Though I can imagine 
that there's some in syntactic sugar land that will pervert the meaning of 
"fat model / skinny controller" in that way :)

And syntactic sugar is not legible to the next person who is looking at 
your code.

Thank you for the advice about trimming the quoted text.




 

On Saturday, March 3, 2012 11:14:08 AM UTC-5, Rodrigo Rosenfeld Rosas wrote:
>
>  Em 03-03-2012 12:41, Mark Peterson escreveu: 
>
> On Saturday, March 3, 2012 9:23:16 AM UTC-5, Rodrigo Rosenfeld Rosas 
> wrote: 
>>
>> Given the code below, it seems you're just starting using Rails and you 
>> still don't understand Rails basic concepts. 
>>
>> Shouldn't you consider posting in the user's mailing list first? It's 
>> more likely that you'll get better advices there than here...
>>
>> After you get used to Rails, if you still have questions about how Rails 
>> should do things, then your questions will be better discussed here.
>>
>> Cheers,
>> Rodrigo.
>>
>
> Are you referring to my complete and utter lack of syntactic sugar? 
> It almost seems as though I deliberately avoid the stuff completely :)
>  
>
> Please don't remove text from the threads. Not everyone reads them in 
> Gmail and it makes it really hard to read the messages in an e-mail client, 
> like Thunderbird.
>
> ---
> class User < ActiveResource::Base 
>   self.site = "http://localhost:9000"; <http://localhost:9000> 
> end"
> ---
>
> I don't call this "lack of syntactic sugar". This is completely wrong Ruby 
> code and makes me feel that you don't know Ruby enough. Please, post the 
> full code as it is actually easier to read the code with all its "syntactic 
> sugar".
>
>  This might be the wrong forum, but I'm sure that ActiveResource team are 
> happy that I proofed the issue.
>
> As an expert core member Rodrigo, do you know the alternative to this line?
> Dir.glob("#{Rails.root}/app/models/*.rb").sort.each { |file| 
> require_dependency file }
>  
>
> I'm not a Rails core member, nor even an expert in Rails. And I don't know 
> why you need this. Shouldn't Rails be automatically loading those files? 
> Why should they be loaded in any particular order?
>
> Cheers,
> Rodrigo.
>
>  

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-core/-/Fv-8YWgZitwJ.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to