On 6 February 2013 04:22, Ashokkumar Yuvarajan
<[email protected]> wrote:
>
> Hi dude,
>
> Good Day,
>
> My some_text content like this = "<p>TruncateHtml is just like the 
> <strong>vanilla truncate <strong>rails helper , TruncateHtml is just like the 
> vanilla truncate rails helper<p>"
>
> As you said i pasted helper code in my pp_helper.rd and in my view,
>
> app_helper.rb
> def
> truncate_text(text, length, end_text)

How many arguments has this method got?

>
> end_text ||= '' # end_text as an optional parameter new_text = truncate(text, 
> :length => length) new_text = new_text + end_text new_text end
>
> my_view
>    - some_text = raw a.content
>    = truncate_text(some_text, 15)

How many arguments are you passing?

>
> I got an error
>
> wrong number of arguments (2 for 3)

I wonder what that means.  The clue may be in the error message.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to