Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8346415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:00:28+00:00 2026-06-09T07:00:28+00:00

I’m thinking about solving my problem and need some help. I need to pay

  • 0

I’m thinking about solving my problem and need some help.

I need to pay users, so I have page, where admin see all users and can pay each of them.

I have websites model, which is belong to user. Depends on some attribute from website model I should pay to user, but user has many websites and it is not clear to me how to organise this.

I can get all user’s websites by calling

    user.websites

EDIT:
I can’t get how I can generate for each website separate link, because I din’t need to sum all payments – I need SEPARATE link for each website

Here is my pay function(left only related code):

   def pay
     ...
    user = User.find(params[:user_id])
    @params_id = params[:user_id]
    @websites = user.websites
       data = {"actionType" => "PAY",
               "receiverList.receiver(0).email"=> user.email,
              "receiverList.receiver(0).amount" => website.amount,         
    ...

   end

or I should add website each do in my view. something like:

     <% @users.each do |user| %>
      <%@websites.each do |website|%>
     <li>
     <%= user.email %>
      <%= link_to "Pay", pay_path(user.id, website.amount)%>
    </li>
    <%end%>
 <% end %>

What you can reccomend me and I will appreciate any help !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:00:29+00:00Added an answer on June 9, 2026 at 7:00 am

    I am not sure I understand your question right but I think this could help you

    <% users.each do |user| %>
      <% user.websites.each do |website| %>
        <span id="user-email"><%= user.email %></span>
        <span id="payment"><%= link_to "Pay #{number_to_currency(website.amount)}", pay_path(user.id, website.id), remote: true, confirm: "Are you sure you want to pay?" %></span>
      <% end %>
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.