I'm new to rails and I got little confused when I seen this code in a view file.
<%= make_case_name payment, current_cart %>
What does the above code do.. Where to look for this payment variable?
Your above code aims to call the method make_case_name
with two arguments: payment
and current_cart
.
As this code is embedded in your view, that means payment
and current_cart
are local variable. The method make_case_name
is located in your helper.
Anyway, if it's belongs to a specific project that you're working on, you should contact with the project owner or developers for further details.
You have a following method which takes two parameters ie payment and current_cart. Those are the local variables.
Structure is as follows
def make_case_name(payment, current_cart)
# your logic code
end
As per my assumption your make_case_name method may be present in the helpers .
Note : If you give few more details that would be helpful
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.