sugar-framework / sugar

Modular web framework for Elixir
https://sugar-framework.github.io/
MIT License
430 stars 29 forks source link

[WIP] Avoids having to specify the view folder in render/2 #49

Closed vjustov closed 9 years ago

vjustov commented 9 years ago

As it stands now you have to specify the relative path to the view in order for it to be rendered.

This PR adds support to render :index, render "index" to specify the particular view and takes the controller name to look in what folder, while trying to maintain the backwards compatibility. And will add along the way automatic rendering of a view with the same name as the action.

I'm still trying to figure out how to test the controller and action automatic rendering. And would love to hear opinions, comments and constructive criticism .

slogsdon commented 9 years ago

@vjustov It's been a while since I've worked on this project, but everything looks good so far. I made a quick comment regarding the failed tests stemming from a KeyError from the conn.private.controller call.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.1%) when pulling 9bfdfa43bcc8420a27ed1967d3cf60fb4a974c3a on vjustov:render into 1011cee7263897c02368c2388a7d6c841bd1023c on sugar-framework:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.1%) when pulling 9a920f167ed17872ba970bbd93db9dc041dd432a on vjustov:render into 0587dd92ac2fdc0e812397b8935af7fc0135d143 on sugar-framework:master.

slogsdon commented 9 years ago

@vjustov Let me know when you're ready for this to be merged into master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.1%) when pulling dd65e39b6b0eb3e1b6ad38812f3f4cfc56698777 on vjustov:render into 0587dd92ac2fdc0e812397b8935af7fc0135d143 on sugar-framework:master.

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-1.7%) when pulling 15806d9d6790bd159f9e76d83ed3a2ff822b7c09 on vjustov:render into ee62105f2a6c651e7f3e6721104f2d1c041dadfb on sugar-framework:master.