No need to give an example where there is generated code right there to serve as the example

上级 4017f6c7
......@@ -104,11 +104,7 @@ def set_<%= singular_table_name %>
@<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %>
end
# Use this method to whitelist the permissible parameters. Example:
# params.require(:person).permit(:name, :age)
#
# Also, you can specialize this method with per-user checking of permissible
# attributes.
# Never trust parameters from the scary internet, only allow the white list through.
def <%= "#{singular_table_name}_params" %>
<%- if attributes_names.empty? -%>
params[<%= ":#{singular_table_name}" %>]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册