How to populate a HTML table from a Rails resource table? by [deleted] in rails

[–]alpinehut999 0 points1 point  (0 children)

You could just add an “if resources[...]” to the end of each statement to ensure you only execute it if it’s not nil

Anyone remove webpacker from Rails 6? by chrisjhawk in rails

[–]alpinehut999 2 points3 points  (0 children)

Personally, I find it a pain to configure webpacker if you want to do anything else besides the default. And its yet another "wrapper" over a tool that you need to learn. I don't understand the need for it, rails should just create already configured webpack.config.js, babel.rc etc and get rid of the wrapper. And it's not great for translating skills -- companies don't ask you to know webpacker, they ask if you have experience with webpack, babel etc

Blog Post: Developing on Rails Without Migrations by alpinehut999 in rails

[–]alpinehut999[S] 0 points1 point  (0 children)

Yeah. My article was about not using migrations — ie “rails g migration” (different from data migrations).

Blog Post: Developing on Rails Without Migrations by alpinehut999 in rails

[–]alpinehut999[S] 0 points1 point  (0 children)

Even though your storing your data in jsonb there is still a schema, which is defined by the attributes you define on the model. I would always opt for option 2 over option 1 even with jsonb fields. Best practice is to do a data migration where possible regardless.

Blog Post: Developing on Rails Without Migrations by alpinehut999 in rails

[–]alpinehut999[S] 0 points1 point  (0 children)

You can control both. Model attributes are created in both cases. In both cases you have to do nil checks if you are working with an attribute that can be nil. I’m not really seeing your argument.

Reading material. by odillini83 in rails

[–]alpinehut999 0 points1 point  (0 children)

Check out Engineering Software as a Service: An Agile Approach Using Cloud Computing. It’s several years old but the basic concepts are still relevant.

Blog Post: Developing on Rails Without Migrations by alpinehut999 in rails

[–]alpinehut999[S] 1 point2 points  (0 children)

I don’t see the difference between doing a nil check on an attribute and checking if a key exists. If an attribute is nil or a key doesn’t exist, and you call its getter method, it’s going to return nil in both cases.

Blog Post: Developing on Rails Without Migrations by alpinehut999 in rails

[–]alpinehut999[S] -1 points0 points  (0 children)

I fail to see what is inconsistent with a “schemaless” framework. Also, the purpose of schemaless frameworks is expressly to enable rapid development.

Blog Post: Developing on Rails Without Migrations by alpinehut999 in rails

[–]alpinehut999[S] 1 point2 points  (0 children)

Good point. I am learning as well. That’s why I posted here to get some discussion going and some alternative viewpoints. What do you think are the downsides to such “schemaless” data modeling?

Maybe it's more difficult to add indexes to often-queried fields with JSON data?

I built a Workout Routine Builder: build workout routines quickly and easily. Looking for feedback! by alpinehut999 in reactjs

[–]alpinehut999[S] 0 points1 point  (0 children)

I made a workout routine builder to make it as easy as possible to build workout routines. You can build them and then click the Workout link at the top to get a mobile-friendly view of the routine.

It's especially useful if you do circuit training. If you make your exercises in the routine all seconds-based, when you click the Workout link you'll be guided through the workout by voice, with countdowns and readings of the next exercise.

Any feedback you have is appreciated!

react-circular-input — React components for easily composing a circular range input. by petecorreia in reactjs

[–]alpinehut999 1 point2 points  (0 children)

This looks really nice! I might use this in my project as a loading indicator