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

  • Home
  • SEARCH
  • 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 8395483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:18:42+00:00 2026-06-09T20:18:42+00:00

Good day, I’ve this code in view, it generates wrong number of arguments (3

  • 0

Good day, I’ve this code in view, it generates

wrong number of arguments (3 for 2)
Extracted source (around line #7):

4:     <h3 class="<%= cycle('color_1', 'color_2')  %> ">
5:       <%= link_to sanitize(article.title),article %>
6:     </h3>
7:     <% output_text = truncate(article.text, 40, "...") %>
8:     <span><%= sanitize(output_text) %>
9:       <%= link_to ' ... full ->',  article %></span>
10:     <span style="display: none">

That’s where i check truncate http://paulsturgess.co.uk/articles/37-how-to-truncate-text-in-ruby-on-rails

And if i write

<% output_text = truncate(article.text, 40) %>

I get

undefined method `reverse_merge!' for 40:Fixnum
  • 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-09T20:18:43+00:00Added an answer on June 9, 2026 at 8:18 pm

    <% output_text = truncate(article.text, 40, "...") %>

    should be

    <% output_text = truncate(article.text, :length => 40, :omission => '...' ) %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day! I've found this solution here: VS2010 Web Publish command line version of
Good Day, Can someone confirm what was said at the bottom of this post
Good day, I have a class that implements the LoaderCallbacks, and hence have the
Good day, all. I know that this is a pretty basic question in terms
Good day everyone, this is one of those areas that is a little over
Good day everybody! Having the following code: template<typename T, typename OutStream = std::ostream> struct
Good day! I'm wondering if it's possible to assign multiple different types of arguments
Good day! I want to show all the pictures in the folder, but this
Good day! I've a model that is binded from JSON request, say like this:
Good day! i have a code below: def initial(*args): for arg in args: with

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.