impressionist icon indicating copy to clipboard operation
impressionist copied to clipboard

Is it possible to log impression with message without model?

Open unkmas opened this issue 11 years ago • 4 comments

Hi!

I want to log impressions on some actions like 'index', where i can't operate with a single object. And i want to put params or custom message to impression. Is there a way to do this?

Thank you!

unkmas avatar Jun 19 '14 16:06 unkmas

Same here. I'd love to track a search action, including the query and the user, but no model.

chengguangnan avatar Nov 02 '14 12:11 chengguangnan

Checked the code. You can do this:

def index
    Impression.create(direct_create_statement(message: params[:q]))
   ...
end

chengguangnan avatar Nov 02 '14 13:11 chengguangnan

Hello, I can't figured out this:

I have a :home action inside a static_pages controller without a model. Where I list some 'exhibits' models. I wanto to get the count of visits inside this static_pages#home.

How can I see the count inside my home.html,erb view?. I think you did something similar?...

Thanks.

Javingka avatar May 11 '15 15:05 Javingka

Same here, I can track controller action but how should I view it??? It's nowhere in document.

rajanverma-me avatar Sep 19 '20 15:09 rajanverma-me