SlideShare a Scribd company logo
1 of 13
Download to read offline
tabulatr2 
Index Pages for Lazy People… 
Florian Thomas 
ft@tickettoaster.de 
@crunch09 
Peter Horn 
ph@tickettoaster.de 
@n0dashes 
Lightning Talk 
Oct 3rd 2014
Classic Index Page 
index.html.slim 
simple ‘nuf 
tr 
th Firstname 
th Lastname 
th Balance 
@customers.each do |customer| 
tr 
td= customer.firstname 
td= customer.lastname 
td= customer.balance 
customer_controller.rb 
def index 
@customers = Customer.all 
end
Classic Index Page 
Lovely! 
Just quickly add 
• Pagination 
• Filtering 
• Sorting 
• Searching 
index.html.slim 
simple ‘nuf 
tr 
th Firstname 
th Lastname 
th Balance 
@customers.each do |customer| 
tr 
td= customer.firstname 
td= customer.lastname 
td= customer.balance 
customer_controller.rb 
def index 
@customers = Customer.all 
end 
• Batch Actions 
…and we’re done.
Classic Index Page 
Lovely! 
Just quickly add 
• Pagination 
• Filtering 
• Sorting 
• Searching 
index.html.slim 
simple ‘nuf 
tr 
th Firstname 
th Lastname 
th Balance 
@customers.each do |customer| 
tr 
td= customer.firstname 
td= customer.lastname 
td= customer.balance 
customer_controller.rb 
def index 
@customers = Customer.all 
end 
• Batch Actions 
…and we’re done.
That can’t be! 
• ActiveRecord is so simple (and even adequate) 
• SimpleForm is so simple! 
Why need tables to be such a hazzle?
That can’t be! 
Because a friggin’ lot of stuff 
is involved. 
…but now 
• ActiveRecord is so simple (and even adequate) 
• SimpleForm is so simple! 
…there’s tabulatr2! 
Why need tables to be such a hazzle?
Tabulatr Index Page 
index.html.slim 
= table_for Customer 
customer_controller.rb 
def index 
tabulatr_for Customer 
end 
customer_tabulatr_data.rb 
class CustomerTabulatrData < 
Tabulatr::Data 
! 
search :firstname, :lastname 
column :firstname 
column :lastname 
column :balance, 
format: :currency, 
align: :right 
end
Tabulatr Index Page 
index.html.slim 
= table_for Customer 
customer_controller.rb 
def index 
tabulatr_for Customer 
end 
customer_tabulatr_data.rb 
class CustomerTabulatrData < 
Tabulatr::Data 
! 
search :firstname, :lastname 
column :firstname 
column :lastname 
column :balance, 
format: :currency, 
align: :right 
end
There’s so much more 
• All data is fetched via ajax 
• Custom SQL for sorting, filtering, sorting, no N + 1 
• Tables are (by default) stateful 
• Infinite scrolling, if you so wish 
• Shortcuts to create ‘action’ buttons 
• Support for static tables (non-ajax) 
• Batch actions 
• …
How Does That Work? 
(rough concept only) 
Controller 
Renderer 
DSL 
Javascript 
View 
TabulatrData
122.54% Cooler!* 
✴ Based on a study with 4 developers that took place 
between October 1st and October 2rd 2014 in 
some pubs in Ghent. There definitely was too much 
alcohol involved, and the number is made up 
anyway, but things look so much more professional 
with a footnote.
Sparklelord demands: 
Give it a try! 
Talk to us! 
@n0dashes / no-dashes! 
@crunch09 / Crunch09 
github.com/provideal/tabulatr2

More Related Content

Similar to tabulatr2 – Index Tables for Lazy People

VSSML18. Data Transformations
VSSML18. Data TransformationsVSSML18. Data Transformations
VSSML18. Data TransformationsBigML, Inc
 
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...Cathrine Wilhelmsen
 
Checklinks, What does it do, what to watch for, what can go wrong.pptx
Checklinks, What does it do, what to watch for, what can go wrong.pptxChecklinks, What does it do, what to watch for, what can go wrong.pptx
Checklinks, What does it do, what to watch for, what can go wrong.pptxDexterityDev
 
(PFC402) Bigger, Faster: Performance Tips for High Speed and High Volume Appl...
(PFC402) Bigger, Faster: Performance Tips for High Speed and High Volume Appl...(PFC402) Bigger, Faster: Performance Tips for High Speed and High Volume Appl...
(PFC402) Bigger, Faster: Performance Tips for High Speed and High Volume Appl...Amazon Web Services
 
Data+Modelling.pptx
Data+Modelling.pptxData+Modelling.pptx
Data+Modelling.pptxssuser58c23b
 
Data+Modelling.pptx
Data+Modelling.pptxData+Modelling.pptx
Data+Modelling.pptxssuser58c23b
 
Relational Model in NoSQL Article.pptx
Relational Model in NoSQL Article.pptxRelational Model in NoSQL Article.pptx
Relational Model in NoSQL Article.pptxClaudioCordova10
 
(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming(WRK302) Event-Driven Programming
(WRK302) Event-Driven ProgrammingAmazon Web Services
 
Power Automate Techniques that "Saved Our Bacon"
Power Automate Techniques that "Saved Our Bacon"Power Automate Techniques that "Saved Our Bacon"
Power Automate Techniques that "Saved Our Bacon"Thomas Duff
 
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...Cathrine Wilhelmsen
 
60 reporting tips in 60 minutes - SQLBits 2018
60 reporting tips in 60 minutes - SQLBits 201860 reporting tips in 60 minutes - SQLBits 2018
60 reporting tips in 60 minutes - SQLBits 2018Ike Ellis
 
SQL intro.pptx
SQL intro.pptxSQL intro.pptx
SQL intro.pptxRobNieves1
 
Data Warehouse Back to Basics: Dimensional Modeling
Data Warehouse Back to Basics: Dimensional ModelingData Warehouse Back to Basics: Dimensional Modeling
Data Warehouse Back to Basics: Dimensional ModelingDunn Solutions Group
 
Datomic – A Modern Database - StampedeCon 2014
Datomic – A Modern Database - StampedeCon 2014Datomic – A Modern Database - StampedeCon 2014
Datomic – A Modern Database - StampedeCon 2014StampedeCon
 
Intro to Rails ActiveRecord
Intro to Rails ActiveRecordIntro to Rails ActiveRecord
Intro to Rails ActiveRecordMark Menard
 
Hands-On: Managing Slowly Changing Dimensions Using TD Workflow
Hands-On: Managing Slowly Changing Dimensions Using TD WorkflowHands-On: Managing Slowly Changing Dimensions Using TD Workflow
Hands-On: Managing Slowly Changing Dimensions Using TD WorkflowTreasure Data, Inc.
 

Similar to tabulatr2 – Index Tables for Lazy People (20)

VSSML18. Data Transformations
VSSML18. Data TransformationsVSSML18. Data Transformations
VSSML18. Data Transformations
 
Topics-Ch4Ch5.ppt
Topics-Ch4Ch5.pptTopics-Ch4Ch5.ppt
Topics-Ch4Ch5.ppt
 
Topics-Ch4Ch5.ppt
Topics-Ch4Ch5.pptTopics-Ch4Ch5.ppt
Topics-Ch4Ch5.ppt
 
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLBit...
 
Checklinks, What does it do, what to watch for, what can go wrong.pptx
Checklinks, What does it do, what to watch for, what can go wrong.pptxChecklinks, What does it do, what to watch for, what can go wrong.pptx
Checklinks, What does it do, what to watch for, what can go wrong.pptx
 
(PFC402) Bigger, Faster: Performance Tips for High Speed and High Volume Appl...
(PFC402) Bigger, Faster: Performance Tips for High Speed and High Volume Appl...(PFC402) Bigger, Faster: Performance Tips for High Speed and High Volume Appl...
(PFC402) Bigger, Faster: Performance Tips for High Speed and High Volume Appl...
 
Data+Modelling.pptx
Data+Modelling.pptxData+Modelling.pptx
Data+Modelling.pptx
 
Data+Modelling.pptx
Data+Modelling.pptxData+Modelling.pptx
Data+Modelling.pptx
 
Relational Model in NoSQL Article.pptx
Relational Model in NoSQL Article.pptxRelational Model in NoSQL Article.pptx
Relational Model in NoSQL Article.pptx
 
(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming
 
Power Automate Techniques that "Saved Our Bacon"
Power Automate Techniques that "Saved Our Bacon"Power Automate Techniques that "Saved Our Bacon"
Power Automate Techniques that "Saved Our Bacon"
 
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
 
Deep Dive on Amazon DynamoDB
Deep Dive on Amazon DynamoDBDeep Dive on Amazon DynamoDB
Deep Dive on Amazon DynamoDB
 
Dbms &amp; oracle
Dbms &amp; oracleDbms &amp; oracle
Dbms &amp; oracle
 
60 reporting tips in 60 minutes - SQLBits 2018
60 reporting tips in 60 minutes - SQLBits 201860 reporting tips in 60 minutes - SQLBits 2018
60 reporting tips in 60 minutes - SQLBits 2018
 
SQL intro.pptx
SQL intro.pptxSQL intro.pptx
SQL intro.pptx
 
Data Warehouse Back to Basics: Dimensional Modeling
Data Warehouse Back to Basics: Dimensional ModelingData Warehouse Back to Basics: Dimensional Modeling
Data Warehouse Back to Basics: Dimensional Modeling
 
Datomic – A Modern Database - StampedeCon 2014
Datomic – A Modern Database - StampedeCon 2014Datomic – A Modern Database - StampedeCon 2014
Datomic – A Modern Database - StampedeCon 2014
 
Intro to Rails ActiveRecord
Intro to Rails ActiveRecordIntro to Rails ActiveRecord
Intro to Rails ActiveRecord
 
Hands-On: Managing Slowly Changing Dimensions Using TD Workflow
Hands-On: Managing Slowly Changing Dimensions Using TD WorkflowHands-On: Managing Slowly Changing Dimensions Using TD Workflow
Hands-On: Managing Slowly Changing Dimensions Using TD Workflow
 

Recently uploaded

Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Hasting Chen
 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...NETWAYS
 
Philippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptPhilippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptssuser319dad
 
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝soniya singh
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@vikas rana
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyPooja Nehwal
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AITatiana Gurgel
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesPooja Nehwal
 
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...NETWAYS
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Delhi Call girls
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxNikitaBankoti2
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...NETWAYS
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfhenrik385807
 
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxmohammadalnahdi22
 
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...NETWAYS
 
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...NETWAYS
 
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )Pooja Nehwal
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Kayode Fayemi
 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Pooja Nehwal
 

Recently uploaded (20)

Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
 
Philippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptPhilippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.ppt
 
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AI
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
 
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
 
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
 
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
 
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
 

tabulatr2 – Index Tables for Lazy People

  • 1. tabulatr2 Index Pages for Lazy People… Florian Thomas ft@tickettoaster.de @crunch09 Peter Horn ph@tickettoaster.de @n0dashes Lightning Talk Oct 3rd 2014
  • 2.
  • 3. Classic Index Page index.html.slim simple ‘nuf tr th Firstname th Lastname th Balance @customers.each do |customer| tr td= customer.firstname td= customer.lastname td= customer.balance customer_controller.rb def index @customers = Customer.all end
  • 4. Classic Index Page Lovely! Just quickly add • Pagination • Filtering • Sorting • Searching index.html.slim simple ‘nuf tr th Firstname th Lastname th Balance @customers.each do |customer| tr td= customer.firstname td= customer.lastname td= customer.balance customer_controller.rb def index @customers = Customer.all end • Batch Actions …and we’re done.
  • 5. Classic Index Page Lovely! Just quickly add • Pagination • Filtering • Sorting • Searching index.html.slim simple ‘nuf tr th Firstname th Lastname th Balance @customers.each do |customer| tr td= customer.firstname td= customer.lastname td= customer.balance customer_controller.rb def index @customers = Customer.all end • Batch Actions …and we’re done.
  • 6. That can’t be! • ActiveRecord is so simple (and even adequate) • SimpleForm is so simple! Why need tables to be such a hazzle?
  • 7. That can’t be! Because a friggin’ lot of stuff is involved. …but now • ActiveRecord is so simple (and even adequate) • SimpleForm is so simple! …there’s tabulatr2! Why need tables to be such a hazzle?
  • 8. Tabulatr Index Page index.html.slim = table_for Customer customer_controller.rb def index tabulatr_for Customer end customer_tabulatr_data.rb class CustomerTabulatrData < Tabulatr::Data ! search :firstname, :lastname column :firstname column :lastname column :balance, format: :currency, align: :right end
  • 9. Tabulatr Index Page index.html.slim = table_for Customer customer_controller.rb def index tabulatr_for Customer end customer_tabulatr_data.rb class CustomerTabulatrData < Tabulatr::Data ! search :firstname, :lastname column :firstname column :lastname column :balance, format: :currency, align: :right end
  • 10. There’s so much more • All data is fetched via ajax • Custom SQL for sorting, filtering, sorting, no N + 1 • Tables are (by default) stateful • Infinite scrolling, if you so wish • Shortcuts to create ‘action’ buttons • Support for static tables (non-ajax) • Batch actions • …
  • 11. How Does That Work? (rough concept only) Controller Renderer DSL Javascript View TabulatrData
  • 12. 122.54% Cooler!* ✴ Based on a study with 4 developers that took place between October 1st and October 2rd 2014 in some pubs in Ghent. There definitely was too much alcohol involved, and the number is made up anyway, but things look so much more professional with a footnote.
  • 13. Sparklelord demands: Give it a try! Talk to us! @n0dashes / no-dashes! @crunch09 / Crunch09 github.com/provideal/tabulatr2