Save 36% for Black Friday! Learn more

ramzieus

Joined

830 Experience
0 Lessons Completed
1 Question Solved

Activity

Posted in How do I include FontAwesome Pro in a Rails 7 project?

I think if you are using "importmap" you can pin your vendor asset like the documentation said https://github.com/rails/importmap-rails

Absolute path:
import React from "/Users/DHH/projects/basecamp/node_modules/react"
Relative path:
import React from "./node_modules/react"
HTTP path:
import React from "https://ga.jspm.io/npm:react@17.0.1/index.js"
Importmap-rails provides a clean API for mapping "bare module specifiers" like "react" to 1 of the 3 viable ways of loading ES Module javascript packages.

For example:

config/importmap.rb

pin "react", to: "https://ga.jspm.io/npm:react@17.0.2/index.js"
means "everytime you see import React from "react" change it to import React from "https://ga.jspm.io/npm:react@17.0.2/index.js""

import React from "react"
// => import React from "https://ga.jspm.io/npm:react@17.0.2/index.js"

Posted in Working with rails caching

Rails.cache.write('name','Hello this is string' , :expires_in => 1.week)
Rails.cache.read('name')

i use these syntax but always it's nil
=> nil

Posted in How do I change timezone in Ahoy analitics gem ?

I change the rails timezone config/timezone
then config.time_zone = 'West Central Africa'
the restart server
it's done.

I think that you can do it from the html_options = {}
ApiDock

Posted in How do I change timezone in Ahoy analitics gem ?

I search a lot but no result

from the documentation :
datetime_select(object_name, method, options = {}, html_options = {})
in your case try this :
= f.datetime_select :published_at,{} ,{style="width:auto;"}

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.