3 ms·
So in Rails best-practices, you'd still have 3 "languages", they'd just be spread around in 3 files. I'm a Haml fan, so I'd have a view template like: = pag
by psadauskas 18y ago
So in Rails best-practices, you'd still have 3 "languages", they'd just be spread around in 3 files.
I'm a Haml fan, so I'd have a view template like:
= paginate(@employees)
%ul
- @employees.each do |employee|
%li
= employee.first_name
= employee.last_name
and then a helper to fill out the "paginate", or some plugin to handle it for me, and finally an unobtrusive js file.
So I get 3 languages. The only real WTF I see here is the "onClick", and for an example in some documentation about a framework, its forgivable. Could also be broken up into separate files, because the pagination part is a bit complex for a view. Again, though, its a documentation example, on the paginator helper, no less.