brady v0.0.4 Brady

Summary

Functions

Returns the controller name and controller-action name as a lowercase, dasherized string

Functions

body_class(conn)

Specs

body_class(%Plug.Conn{adapter: term, assigns: term, before_send: term, body_params: term, cookies: term, halted: term, host: term, method: term, owner: term, params: term, path_info: term, peer: term, port: term, private: term, query_params: term, query_string: term, remote_ip: term, req_cookies: term, req_headers: term, request_path: term, resp_body: term, resp_cookies: term, resp_headers: term, scheme: term, script_name: term, secret_key_base: term, state: term, status: term}) :: String.t

Returns the controller name and controller-action name as a lowercase, dasherized string.

For example, when the conn came from CoolWidgetsController#show:

Brady.body_class(conn) => 'cool-widgets cool-widgets-show'"