Reputation:
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?
Upvotes: 0
Views: 106
Reputation: 4446
You have a following method which takes two parameters i.e 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
Upvotes: 0
Reputation: 76
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.
Upvotes: 1