Skip to content

lukewhchen/MyFramework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyFramework

MyFramework is a lightweight MVC framework developed with Ruby and inspired by Rails. MVC stands for Model-View-Controller. It’s a paradigm, allowing developers to factor out the various components of an application and more easily update them.

ControllerBase

  • redirect_to(url): Redirect to the passed URL.

  • render_content(content, content_type): Render custom content with the specified content_type.

  • session: key/value pairs saved to this hash are saved as cookies.

  • flash and flash.now: key/values pairs saved to this hash will persist through the next session and the current session only, respectively.

  • protect_from_forgery: MyFramework will check for an authenticity token in any submitted data. This token can be added to the forms in your views.

Router

  • The Router allows the mapping of routes to your custom controllers.

Rack Middleware

  • Exceptions provides a detailed error message for any errors, which is useful for development.

  • StaticAssets allows the serving of static assets from the public folder. Supported extensions included jpg, txt, zip, and HTML.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published