Ryan Carter

Joined

1,500 Experience
3 Lessons Completed
1 Question Solved

Activity

Posted in How do I search Action Text with Ransack?

For anyone else searching for this issue, I found a solution.

Add this to your model -
has_one :action_text_rich_text,
class_name: 'ActionText::RichText',
as: :record

And then add or_action_text_rich_text_body to your search field, because "body" is what is created when the ActionText migration is created.

Posted in How do I search Action Text with Ransack?

I have set up a basic search using Ransack but I don't understand how to get it to search Action Text. This is how it is implimented in the search_form_for:

f.search_field :title_or_rcontent_or_city_or_state_i_cont

The rcontent is the Action Text portion.

Posted in Bidding App

I am building a website with a very specific way they want items bid on. That would be the initial bid will always be $125 and each additional bid will increase by exactly $25. So $125, $150, $175, etc.

What would be the best way to do this?

Posted in Generic Infinite Scrolling

Thanks Nick. I appreciate the ideas. I'll see what I can come up with.

Posted in Generic Infinite Scrolling

I am building an app that has a couple of columns and I only want one column to scroll infinitely. I am trying to hack together a gem free version, but I am a novice with .js or jquery.

My question is this: Is there a way to create pagination with something using find_each and batches....

Post.find_each(:batch_size => 25) do |post|
code...
end

And then trigger another "batch" with some sort of event, number, marker, or scroll event? Maybe something when you hit the 23rd record of each batch is generates a new batch?

Not sure if this is possible. I am just thinking out loud here.

Posted in Manipulate photos already on S3 or Spaces

Jesper, thanks for the info.

Posted in Manipulate photos already on S3 or Spaces

Scenerio: User uploads a huge file to S3 or Spaces.

Question: How can I set up a job or worker to go into S3 or Spaces and resize that file at a later time, or even batch all of the days uploaded images to a max size and quality. I am trying to save space on my server not just create variations, so I want to replace the original file with the new "optimized" file.

Posted in Anyone had experience with Wasabi Cloud Storage?

They claim $4.99 per TB/month with no API calls and Unlimited free egress, Amazon S3 API support, 6x faster than AWS S3, and they work with a couple different CDNs. This seems like a fantastic service, but I have yet to find anyone that is using them or has used them.

Anyone?

Jack, thanks for the reply. I considered that way, but I need something in the database for error issues and for my meta tags. I will probably just make that a required item and use some validations. Thanks again for the help.

If the User does not upload an image using active storage, how do I set a default image for that record?

Posted in Encrypted Credentials in Rails 5.2 with Cloud9

Does anyone know what the [ EDITOR="cloud9 --wait" ] code is for Cloud9 so that I can edit the credentials?

Posted in How do I build conditional form fields?

Was there an episode made regarding this issue?  I looked and didn't see anything, so I just wanted to make sure I didn't miss it.

-Thanks

Posted in Multi-URL Website Setup/Architecture

Lets say you want to set up a forum site at mainforum.com.

Then you want to add a subdomain where the URL xyz.com would point to something like xyz.mainforum.com. All of xyz.com's forum questions will show in mainforum.com, but if I go to xyz.com, only the questions originated there will show.

This is kind of like a multi-tenant type app, but I want one user to be the tenant of all the subdomains and main page. The forums from xyz.com would show up in mainforum.com and even reference the URL where they originated.

Each subdomain would be customizable with things like a header image, logo, about us page, contact us page, and even send emails from that domain.

I hope that makes sense. So basically 1 admin for a main site and multiple sub-domain sites where all the "child" sites have a unique URL, but share their data with the main site. The users could have one set of credentials for all the sites.

Anyway, and suggestions on how to lay out the architecture for something like that would be appreciated.

Posted in Best way to create a report/spam button?

Casey, thanks for the suggestions. I appreciate the time taken to help.

Posted in Best way to create a report/spam button?

Just looking for ideas on the best way to create a report or spam button/link on posts and comments. And do you typically have that notification sent to an in program inbox to an admin email, etc.

Thanks,
Ryan