Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Wallaby - A Very Rails Way Admin Interface
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Tian Chen
April 10, 2018
Technology
65
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Wallaby - A Very Rails Way Admin Interface
Tian Chen
April 10, 2018
Other Decks in Technology
See All in Technology
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
330
WasmをRustにする
sansantech
PRO
0
250
TinyGoでオブザーバビリティ?OpenTelemetryはTinyGoで使えるのか / Is OpenTelemetry available in TinyGo environment?
ymotongpoo
2
140
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
870
Optunaの最新リリースv5.0について
pfn
PRO
0
120
DGX Spark でどこまでハッキングができるのか?
kash1064
3
1.3k
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
6
4.9k
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
190
Kiro Crewをはじめよう
kizawa2020
1
160
今さら理解するウェブフォントver.2026
takanorip
3
810
Temporal 最高!でも改めて「日付」について調べたら人類の負債すぎる件
riyaamemiya
0
150
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
100
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
1
590
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Evolving SEO for Evolving Search Engines
ryanjones
0
330
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
600
Darren the Foodie - Storyboard
khoart
PRO
4
4k
Making Projects Easy
brettharned
120
6.8k
YesSQL, Process and Tooling at Scale
rocio
174
15k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
BBQ
matthewcrist
90
10k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
Producing Creativity
orderedlist
PRO
348
41k
Transcript
WALLABY TIAN @REINTERACTIVE
WALLABY IS ADMIN INTERFACE
IS DSL A GOOD IDEA?
AT THE BEGINNING
UNTIL…
“Can you do a function to allow user to upload
an image and insert its link into the wysiwyg content just like what GitHub does?“
None
WHY?
None
SOLUTION ‣ Build in rails way ‣ Customize in rails
way
EXAMPLE
# app/models/product.rb class Product < ActiveRecord::Base has_one :picture, as: :imageable
has_many :order_items, class_name: Order::Item.name has_many :orders, through: :order_items belongs_to :category has_and_belongs_to_many :tags end
BEFORE
None
None
USE DECORATOR
CUSTOMISE
# app/decorators/product_decorator.rb class ProductDecorator < Wallaby::ResourceDecorator self.show_fields[:preview] = { type:
'markdown', label: 'preview' } self.show_field_names = %w( preview orders ) def preview "# #{name} - #{sku}\n#{description}" end end
<% # app/views/admin/products/show/_markdown.html.erb %> <% markdowner = Redcarpet::Markdown.new( Redcarpet::Render::HTML, {}
) %> <%= raw markdowner.render value %>
# app/controllers/admin/products_controller module Admin class ProductsController < Wallaby::ResourcesController def self.model_class;
Product; end def show flash[:warning] ||= "Product import will happen after business hours tonight." super end end end
AFTER
None
BENEFITS ‣ Embrace the power of Rails ‣ Gentle learning
curve
MORE ‣ Supports all ActiveRecord SQL types
MORE ‣ Handles all associations, including polymorphism
MORE ‣ Handles Single Table Inheritance
MORE ‣ Search function using colon expression
QUESTION? github.com/reinteractive/wallaby