Submit Search
Upload
Routes Generation. Susanin will Help! - Alexey Osipenko
•
0 likes
•
449 views
Ruby Meditation
Follow
Ruby Meditation #15 May 13, 2017 Dnipro, I Coworking Hub
Read less
Read more
Technology
Report
Share
Report
Share
1 of 44
Download now
Download to read offline
Recommended
Vim Text Object
Vim Text Object
Tomohiro Nishimura
"Full Stack frameworks or a story about how to reconcile Front (good) and Bac...
"Full Stack frameworks or a story about how to reconcile Front (good) and Bac...
Fwdays
d.mix: Programming by a Sample
d.mix: Programming by a Sample
Leslie W
Introduction to Django
Introduction to Django
Joaquim Rocha
Django introduction
Django introduction
Joaquim Rocha
Python Code Camp for Professionals 3/4
Python Code Camp for Professionals 3/4
DEVCON
Adopting F# at SBTech
Adopting F# at SBTech
Antya Dev
Road to Rails
Road to Rails
paoloperrotta
Recommended
Vim Text Object
Vim Text Object
Tomohiro Nishimura
"Full Stack frameworks or a story about how to reconcile Front (good) and Bac...
"Full Stack frameworks or a story about how to reconcile Front (good) and Bac...
Fwdays
d.mix: Programming by a Sample
d.mix: Programming by a Sample
Leslie W
Introduction to Django
Introduction to Django
Joaquim Rocha
Django introduction
Django introduction
Joaquim Rocha
Python Code Camp for Professionals 3/4
Python Code Camp for Professionals 3/4
DEVCON
Adopting F# at SBTech
Adopting F# at SBTech
Antya Dev
Road to Rails
Road to Rails
paoloperrotta
The Best (and Worst) of Django
The Best (and Worst) of Django
Jacob Kaplan-Moss
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Bram Adams
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
Dylan Jay
Rails for Beginners - Le Wagon
Rails for Beginners - Le Wagon
Alex Benoit
Html5 bug
Html5 bug
Alberto Granzotto
Socket applications
Socket applications
João Moura
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Ontico
Mashing Up The Guardian
Mashing Up The Guardian
Michael Brunton-Spall
Mashing Up The Guardian
Mashing Up The Guardian
Michael Brunton-Spall
Golang slidesaudrey
Golang slidesaudrey
Audrey Lim
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
James Titcumb
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and Webpack
Ignacio Martín
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
Tikal Knowledge
OSCamp #4 on Foreman | CLI tools with Foreman by Martin Bačovský
OSCamp #4 on Foreman | CLI tools with Foreman by Martin Bačovský
NETWAYS
Exploring the Titanium CLI - Codestrong 2012
Exploring the Titanium CLI - Codestrong 2012
Chris Barber
Building a Single Page Application using Ember.js ... for fun and profit
Building a Single Page Application using Ember.js ... for fun and profit
Ben Limmer
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
Haehnchen
Connecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOP
raimonesteve
Rails::Engine
Rails::Engine
Flavian Missi
Introduction to React Native Workshop
Introduction to React Native Workshop
Ignacio Martín
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Ruby Meditation
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Ruby Meditation
More Related Content
Similar to Routes Generation. Susanin will Help! - Alexey Osipenko
The Best (and Worst) of Django
The Best (and Worst) of Django
Jacob Kaplan-Moss
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Bram Adams
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
Dylan Jay
Rails for Beginners - Le Wagon
Rails for Beginners - Le Wagon
Alex Benoit
Html5 bug
Html5 bug
Alberto Granzotto
Socket applications
Socket applications
João Moura
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Ontico
Mashing Up The Guardian
Mashing Up The Guardian
Michael Brunton-Spall
Mashing Up The Guardian
Mashing Up The Guardian
Michael Brunton-Spall
Golang slidesaudrey
Golang slidesaudrey
Audrey Lim
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
James Titcumb
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and Webpack
Ignacio Martín
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
Tikal Knowledge
OSCamp #4 on Foreman | CLI tools with Foreman by Martin Bačovský
OSCamp #4 on Foreman | CLI tools with Foreman by Martin Bačovský
NETWAYS
Exploring the Titanium CLI - Codestrong 2012
Exploring the Titanium CLI - Codestrong 2012
Chris Barber
Building a Single Page Application using Ember.js ... for fun and profit
Building a Single Page Application using Ember.js ... for fun and profit
Ben Limmer
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
Haehnchen
Connecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOP
raimonesteve
Rails::Engine
Rails::Engine
Flavian Missi
Introduction to React Native Workshop
Introduction to React Native Workshop
Ignacio Martín
Similar to Routes Generation. Susanin will Help! - Alexey Osipenko
(20)
The Best (and Worst) of Django
The Best (and Worst) of Django
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
Rails for Beginners - Le Wagon
Rails for Beginners - Le Wagon
Html5 bug
Html5 bug
Socket applications
Socket applications
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Mashing Up The Guardian
Mashing Up The Guardian
Mashing Up The Guardian
Mashing Up The Guardian
Golang slidesaudrey
Golang slidesaudrey
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and Webpack
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
OSCamp #4 on Foreman | CLI tools with Foreman by Martin Bačovský
OSCamp #4 on Foreman | CLI tools with Foreman by Martin Bačovský
Exploring the Titanium CLI - Codestrong 2012
Exploring the Titanium CLI - Codestrong 2012
Building a Single Page Application using Ember.js ... for fun and profit
Building a Single Page Application using Ember.js ... for fun and profit
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
Connecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOP
Rails::Engine
Rails::Engine
Introduction to React Native Workshop
Introduction to React Native Workshop
More from Ruby Meditation
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Ruby Meditation
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Ruby Meditation
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Ruby Meditation
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Ruby Meditation
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
Ruby Meditation
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
Ruby Meditation
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Ruby Meditation
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Ruby Meditation
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Ruby Meditation
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
Ruby Meditation
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
Ruby Meditation
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
Ruby Meditation
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Ruby Meditation
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Ruby Meditation
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Ruby Meditation
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Ruby Meditation
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Ruby Meditation
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Ruby Meditation
Rails App performance at the limit - Bogdan Gusiev
Rails App performance at the limit - Bogdan Gusiev
Ruby Meditation
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
Ruby Meditation
More from Ruby Meditation
(20)
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Rails App performance at the limit - Bogdan Gusiev
Rails App performance at the limit - Bogdan Gusiev
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
Recently uploaded
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Igalia
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Martijn de Jong
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
Pixlogix Infotech
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Recently uploaded
(20)
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Routes Generation. Susanin will Help! - Alexey Osipenko
1.
cimon.io Алексей Осипенко cimon.io «URL generation
in Rails» Hello I’m Alexey
2.
cimon.io Алексей Осипенко cimon.io «Susanin»
3.
cimon.io Rails 5.1
4.
cimon.io Rails 5.1 Direct Resolved routes &
5.
cimon.io Rails 5.1 direct(:homepage) { "http://www.rubyonrails.org" }
6.
cimon.io Rails 5.1 direct(:homepage) { "http://www.rubyonrails.org" } homepage_url()
7.
cimon.io Rails 5.1 direct :commentable
do |model| [ model, anchor: model.dom_id ] end
8.
cimon.io Rails 5.1 commentable_url(resource) direct :commentable
do |model| [ model, anchor: model.dom_id ] end
9.
cimon.io What's the problem?
10.
cimon.io resources :companies do resources
:projects do resources :comments resources :issues do resources :comments end end end
11.
cimon.io companies_projects_issues_comments_path( comment.issue.project.company, comment.issue.project, comment.issue, comment )
12.
cimon.io comments_path(comment)
13.
cimon.io url_for(comment)
14.
cimon.io url_for([comment])
15.
cimon.io everything is resource or collection
16.
cimon.io everything is resource or collection or parent
17.
cimon.io link_to(resource.name, [resource])
18.
cimon.io Admin::UsersController Client::ProfilesController PublicApp::ProfilesController
19.
cimon.io Admin::UsersController Client::ProfilesController PublicApp::ProfilesController link_to resource.name, [:admin,
resource] link_to resource.name, [:client, resource] link_to resource.name, [:public, resource]
20.
cimon.io Admin::UsersController Client::ProfilesController PublicApp::ProfilesController link_to resource.name, [resource] link_to
resource.name, [resource] link_to resource.name, [resource]
21.
cimon.io Admin::UsersController Client::ProfilesController PublicApp::ProfilesController link_to resource.name, [resource] link_to
resource.name, [resource] link_to resource.name, [resource] User
22.
cimon.io Admin::ProjectsController Client::MyProjectsController PublicApp::ProjectsController link_to resource.name, [resource] link_to
resource.name, [resource] link_to resource.name, [resource] Project
23.
cimon.io url_for [:edit, :client,
resource]
24.
cimon.io url_for [:edit, resource]
25.
cimon.io url_for [ :edit, :client, resource.project.company, resource.project, resource ]
26.
namespace :client do resource
:profiles end namespace :admin do resources :users end namespace :public_app do resource :profiles end
27.
module Client class ApplicationController def
url_for([User] = resource) super([:client, resource]) end end end
28.
module Client class ApplicationController def
users_url(resource) client_users_url(resource) end end end
29.
module Client class ApplicationController def
url_for([..., User, ...] = resource) url_for([..., :client, resource, ...]) end end end
30.
module Client class ApplicationController def
url_for([..., User, ...] = resource) url_for([..., resource.company, resource, ...]) end def url_for([..., Company, ...]) url_for([:client, current_company]) end end end
31.
url_for([user]) url_for([:client, current_company, user])
32.
cimon.io user company, user
:client, company, user
33.
module Client class ApplicationController susanin({ [User]
=> ->(user) { [user.company, user]}, [Company] => ->(company) { [:client, company] }, }) end end
34.
susanin({ [:client] => ->(_)
{ [:jericho] }, [User] => ->(r) { [r.company, r] }, [Project] => ->(r) { [:client, r] }, [Company] => ->(r) { [:client, r] }, })
35.
susanin({ [:client] => ->(_)
{ [:jericho] }, [User] => ->(r) { [r.company, r] }, [Project] => ->(r) { [:client, r] }, [Company] => ->(r) { [:client, r] }, }) url_for([user]) url_for([:jericho, company, user]) jericho_company_user_url(company, user)
36.
susanin({ [:client] => ->(_)
{ [:jericho] }, [User] => ->(r) { [r.company, r] }, [Project] => ->(r) { [:client, r] }, [Company] => ->(r) { [:client, r] }, }) url_for([:edit, user]) url_for([:edit, company, user]) url_for([:edit, :client, company, user]) url_for([:edit, :jericho, company, user]) edit_jericho_company_user_url(company, user)
37.
susanin({ [User] => ->(r)
{ [:client, r] }, [:frontend, User] => ->(_, r) { [:public_app, r] }, }) [user] => [:client, user] [:frontend, user] => [:public_app, user] [:edit, user] => [:edit, :client, user] [:edit, :frontend, user] => [:edit, :public_app, user]
38.
susanin({ [User] => ->(r)
{ [:client, r] }, [:frontend, User] => ->(_, r) { [:public_app, r] }, }) url_for([:frontend, user]) url_for([:client, :frontend, user]) url_for([:public_app, user])
39.
[A, B, C]
=> (a, b, c) { [1] } [A] => (a) { [2] } [A, B] => (a, b) { [3] } [a, b, c] => [1]
40.
[A, B] =>
->(a, b) { 1 } [A] => ->(a) { 2 } [A, B, C] => ->(a, b, c) { 3 } [a, b, c] => [1, c]
41.
[A, B] =>
->(a, b) { [a] } [A] => ->(a) { 2 } [A, B, C] => ->(a, b, c) { 3 } [a, b, c] => [2, c]
42.
cimon.io
43.
alexey@cimon.io Спасибо за внимание telegram@aratak alexey.osipenko@fb.me
44.
https://t.me/itextrapolation
Download now