diff options
| author | mo <mo.khan@gmail.com> | 2017-09-24 13:27:31 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2017-09-24 13:27:31 -0600 |
| commit | dc702a89811e866eec20cc43763096dddf4a41fe (patch) | |
| tree | 40a8e9bc97dedefec9b82331ce499d8189da7dc9 /app/controllers/my | |
| parent | 5395834ccb947dd90e6412e2b27d9e9f120e1ce2 (diff) | |
extract my cakes controller.
Diffstat (limited to 'app/controllers/my')
| -rw-r--r-- | app/controllers/my/cakes_controller.rb | 7 | ||||
| -rw-r--r-- | app/controllers/my/dashboard_controller.rb | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/my/cakes_controller.rb b/app/controllers/my/cakes_controller.rb new file mode 100644 index 00000000..bfc85dc7 --- /dev/null +++ b/app/controllers/my/cakes_controller.rb @@ -0,0 +1,7 @@ +module My + class CakesController < BaseController + def index + @cakes = current_user.creations.includes(:photos) + end + end +end diff --git a/app/controllers/my/dashboard_controller.rb b/app/controllers/my/dashboard_controller.rb index 158dc91c..c3e551bc 100644 --- a/app/controllers/my/dashboard_controller.rb +++ b/app/controllers/my/dashboard_controller.rb @@ -1,7 +1,7 @@ module My class DashboardController < BaseController def index - @cakes = current_user.creations.includes(:photos) + @cakes = current_user.creations.includes(:photos).limit(6) @tutorials = current_user.tutorials.limit(10) @activities = current_user.recent_activities end |
