How to pass size param to carrierwave helper?

Im trying to make 1 global function to display carrier wave images in different sizes. the problem is passing the size var in method call to the carrierwave helper like below:

def get_avatar(id, size)

@profile = User.find(id).profile rescue nil
  image_tag ("/assets/avatars/img_#{size}.png")


I tried all kinds of things but are unable to pass the size var to the here).

How should one approach this?


Heres what worked for me recently.

<% image_tag %>

Need Your Help

using a function from a string of text PHP


I would like to know if it is possible to store the following

Simple pure java CSV reading and parsing

java csv delimiter filereader comma

I am stuck with file reading operation and need your help.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.