Search Results for "regexp-for-prices-or-how-to-detect-price-in-a-smart-way"

Forum Threads

how scrabe data every day

8
General
how can I schedule to gather data with nokogiri and store it(only what has changed) in a db every morning?
Chris Oliver replied

Extend Sprockets to bundle mustache templates

3
Rails
I'm trying to include some Mustache templates into the main JS bundle. The idea is to take `/app/templates/*.mustache` files, generate a JSON object, and set a window-level variable, like this: ``...
Solved

How can I use Rails Each Array and In-page search to show/hide div content

2
Rails
I'm trying to set up a simple search bar to show/hide content in my rails app. Specifically, trying to allow someone to search for a specific user via username in my chatroom which are being shown ...
Omar Khedr replied
Solved

Any good regex rules for validation?

4
General
Currently, i am searching regex rules for validate url. And i am struggled how to build this from scratch. Is anyone have a good resources on this topic?
shakycode replied

validate presence of specific domain in email

5
General
Hi there, is a way via regex to validate an email and make sure it belongs to a specific domain, I found the below regex on SO and it doesnt seem to do the job. validates :email, format: { wi...
JM replied

Rails for Beginners Part 12: Validations Discussion

10
General
I tried copying this regex "\A[^@\s]+@[^@\s]+\z" to https://rubular.com/ but it aren't working until I remove the \A and \z making this [^@\s]+@[^@\s]+ before it could work, any reason for that?
Jerry Lupo replied

How do I generate SEO Friendly URL's for filter combinations in Rails?

6
General
I have a site where the user can apply a combination of multiple filters. To improve the SEO on the site I would like to have the URL in a human-readable format when filters are applied. I would ...
Derek Hobson replied

Rails for Beginners Part 19: Edit Password Discussion

15
General
Editing the password with an empty string (i.e. not filling the fields and clicking right away on the submit button) doesn't throw any error, Current.user.update(password_params) returns true and t...
Alex replied

best way to validate URL

3
Gems / Libraries
Hi Chris! I've been looking for a good URL validator for a while, but all the solutions I found are kinda weird, so I'm not even sure if I wanna use any. Here is my usecase: A user can create a p...
Chris Oliver replied
Solved

Why You Should Focus On Writing Code With Clarity Discussion

4
General
Good article Chris, ruby has the clarity implied, programmers don't... however "ubiquitous language" is something that could help to programmers on this, thanks for share your thoughts!

Do we need an alternative to JSON?

0
Javascript
Hey everyone, Maybe this is a controversial topic but I've been wondering for a while about a JSON alternative. Being able to serialize objects, array, string, numbers and booleans is nice and fit...
Charlesmartin posted

Updating CSS classes in production doesnt show changes

2
General
Ive noticed that anywhere that I adjust the css classes dynamically (select2 boxes and one of my stimulus controllers adds a border when a div is clicked) the classes are added but the display isnt...
Alex Deering replied

Active Storage, AWS S3 and Cloudfront

7
Rails
Im trying to setup cloudfront for my aws s3 storage of user uploaded images. Not sure what settings to change in the storage.yml file to point to the cloudfront and still work with everything else...
Noredeen Al-Zu'bi replied

Code Review: Run Number Refactoring Discussion

17
General
Very useful, code review series is awesome
Marc Gayle replied

@Mentions, Autocomplete, Notifications, and Links | GoRails - GoRails

15
General
This is cool. Although, when you said 'notifications' I was expecting in-app notifications not an email notification. I was wondering how you were going to cover so much material in 1 episode, but ...
Chris Oliver replied

Stimulus JS Framework Introduction Discussion

27
General
I'm literally figuring out StimulusJS right now on an app, and I was hoping you would do a screencast on it soon and save me some time! Awesome timing :)
joelGarcia93 replied

How do I create an app with Urls like 'https://username.website.com/' instead of 'https://website.com/username/' ?

17
Rails
Hello everyone, I searched but didn't find anything and was hoping like I said in the title of this subject, to find a way to get the url displaying a user's profile of a client's app to be like u...
Chris Oliver replied
Solved

Cloning nested fields by JS/coffeescript

0
Javascript
SImple app has a two models and does the function to add nested model fields dynamically through JavaScript. But this stuff does not working with the Turbolinks 5. How to refactoring this code by J...
Dmitrii Amelchenko posted

Regex getting hashtags

0
Ruby
I'm wanting to capture all hastags from the richtext field. I thought I had a solution until I came across testing where the richtext editor put HTML entites into the markup. ``` /#([\w]+)/ ``` `...
Stephen Sizer posted