kobaltz

635114?v=3&s=250

Joined 7/18/2015
# Name
635114?v=3&s=64
kobaltz said about 1 month ago:

I will plan on covering FineUploader with a Shrine series. Thank you for the suggestion.

635114?v=3&s=64
kobaltz said 18 days ago:

Great question. It really depends on the complexity to which you've modified the datatables. If you are using server side data and a full text engine, then I would store the 'yes' and 'no' values as part of the indexed data.

If you're using Rails 5.1.x then you could also use a virtual attribute to search on instead of the integer column.

00000000000000000000000000000000?d=mm&f=y&s=64
bud said 18 days ago:

Thanks for the quick reply.  I am indeed using Rails 5.1.x.  Do you have an example in the context of your demo in how I could accomplish this with virtual attributes?  Never heard of these and am reading about them now.

00000000000000000000000000000000?d=mm&f=y&s=64
bud said 18 days ago:

Thanks!  Very useful.  I understand the concept, but I'm still not sure what the best approach would be to use virtual attributes against an integer column and somehow extract a string from that.  Would I need to define a virtual attribute for each integer that I have mapped as an enum?  In my case I have up to 10 enums in some columns.

00000000000000000000000000000000?d=mm&f=y&s=64
bud said 18 days ago:

Thanks!  Very useful.  I understand the concept, but I'm still not sure what the best approach would be to use virtual attributes against an integer column and somehow extract a string from that.  Would I need to define a virtual attribute for each integer that I have mapped as an enum?  In my case I have up to 10 enums in some columns.

635114?v=3&s=64
kobaltz said 17 days ago:

What environment are you working in?

Photo
saad Benmakhlouf said 17 days ago:

i have a macbook.

i just download it from github a few seconds ago

i didn't do any change

i have npm install 

i want to run it but i couldn't 

Thanks for your quick answer and your help 

635114?v=3&s=64
kobaltz said 17 days ago:

It is a Rails application, so you would need to have Ruby installed. Check out https://www.driftingruby.com/episodes/getting-started-ruby-on-rails-development-environment on getting a non-system ruby installed on your environment. 

Then in the app root, you should be able to just do 

gem install bundler #installs bundle cli
bundle # installs gem dependencies
rake db:migrate # creates the SQLite3 Schema
rails s # starts the development server

Photo
saad Benmakhlouf said 17 days ago:

can i give you my teamviewer (id and password) ??

635114?v=3&s=64
kobaltz said 17 days ago:

It is a Rails application, so you would need to have Ruby installed. Check out https://www.driftingruby.com/episodes/getting-started-ruby-on-rails-development-environment on getting a non-system ruby installed on your environment. 

Then in the app root, you should be able to just do 

gem install bundler #installs bundle cli
bundle # installs gem dependencies
rake db:migrate # creates the SQLite3 Schema
rails s # starts the development server

Photo
saad Benmakhlouf said 17 days ago:

can i give you my teamviewer (id and password) ??

635114?v=3&s=64
kobaltz said 16 days ago:

You might be able to do something like this for a daily count

current_user.impressions.group_by_day(:created_at).count

8632141?v=3&s=64
RailsCod3rFuture said 16 days ago:

The group_by_day & and group_by_month, methods are not being found for some reason. It throws an undefined method error for model, when I try to use the it in my view. I don't know if its an issue with the gem or Postgres compatibility.

Thanks.


635114?v=3&s=64
kobaltz said 16 days ago:

The methods are within the GroupDate gem https://github.com/ankane/groupdate

The gem's documentation does say that it is compatible with postgres, but I am not sure if there is any additional setup on postgres like there is with MySQL.

8632141?v=3&s=64
RailsCod3rFuture said 16 days ago:

Your method is working perfectly in the rails console. I will test in the view today. Thanks.

635114?v=3&s=64
kobaltz said 16 days ago:

The methods are within the GroupDate gem https://github.com/ankane/groupdate

The gem's documentation does say that it is compatible with postgres, but I am not sure if there is any additional setup on postgres like there is with MySQL.

8632141?v=3&s=64
RailsCod3rFuture said 16 days ago:

Your method is working perfectly in the rails console. I will test in the view today. Thanks.

635114?v=3&s=64
kobaltz said 13 days ago:

Any JS errors?

Photo
Silviu Salajan said 13 days ago:

Yes because of `` used on  $.getScript(`https://maps.googleapis.com/maps/api/js?key=${google_map}&callback=initMap`); :D

635114?v=3&s=64
kobaltz said 1 day ago:

Their later versions should support Turbolinks and Rails 5. However, they did deprecate the Uniqueness validation as it could be seen as a security risk. You shouldn't have to specify the branch anymore.

Photo
Denny Deng said 1 day ago:

gem 'client_side_validations'

I tried to bundle install this and worked.

With so many trial and errors, I still could not figure this out. 

Photo
Denny Deng said 1 day ago:

It is working now after I have restarted the server!


Thank you  so much!

635114?v=3&s=64
kobaltz said 1 day ago:

Great! Glad to hear!

635114?v=3&s=64
kobaltz said 1 day ago:

Great! Glad to hear!