ruby on rails - How to get earliest and latest dates for associated objects -


I am developing a Rail 4 app and I get two models. One is called project and the second is called work .

Many tasks in project . Related to Work Project .

The task object contains start_at and end_at attributes (datetime).

I tried @project to get the first start_at and the latest end_at for all specific tasks? .tasks.max (: starts_at) but it does not work (error found).

Use max instead of max .

Maximum array is for maximum: [1,2]. Maximum == 2


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -