Rails best practices [closed] - ruby-on-rails

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Can anyone help me with few indication about best way to do few things.
At this point I am in a situation where I have a task(.rake), and the code become so ugly that I need to split it out. So if I will create another file, probably a module with multiple classes and methods or just methods, where should I put the file (libs probably?)? (this file may be used by models as well). Also if I want to do the same or a module?
Any books, tutorials, articles, and opinions are welcomed.
Thank you

Check out the Rails Guides for an introduction - beyond that, there are many different [opinionated] resources on the matter, ie:
Railscasts

Related

Is Rails controller documentation a best practice? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Reek gem identifies a smell in my code such that it lacks documentation in classes. But I was wondering if that should be applied to controllers as well.
In a good codebase, a controller would be very thin, just dealing with the requests and delegating all the logic to models/services/helpers. Hence not much to document to begin with. Not being an API and especially not an open one, I don't see a good reason to add documentation to it.
Would like to hear your opinion on this.
In my opinion, there is no need for documentation in controllers. But if you want reek to not identify this smell then you can add a one-liner explanation of the controller or add
#:nodoc: all
at the top in your controllers (this is what I do). This is suggested by rubycop gem
Hope this helps.

What does “consume an API” means? With details, please [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I would like to know what "consume an API" means in a less technical language possible and would like too some simple example in git and, if possible, using Ruby. I understand that I may be asking a lot, sorry for that, but I can not understand 100% of the examples I found.
I can not go on, because I have not yet been able to fully understand the subject.
Example:
I have a application, a CRUD simple and a API isa JSON that extract the results this CRUD?
Sorry for my limited understanding. I would very much like details with code example, just something basic.
It means that you take in data from an external source/url and do something with it. Here is an example:
http://www.theodinproject.com/courses/ruby-programming/lessons/file-i-o-and-serialization

hashes -- Seem like mutant potatoes [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
What I have researched about hashes doesn't make them that much clearer to me... what I see is a new [THING] that I cannot see the value in right now. I would RTFM if I could find one worth a beans instead of asking... here is what I was wondering...
I've been looking for answers for a few days now with now avail
Where the heck is a syntax manual for Ruby and further more RoR.
What are these things good for...
I know twitter somehow relies on something of this nature but what is exactly
There's a wealth of information out there, http://ruby-doc.org/core-2.3.0/Hash.html for example is pretty clear on what hashes are.
You need to get your head around some of the basics, there are plenty of tutorials out there, https://www.railstutorial.org/ is one that comes up often, http://guides.rubyonrails.org/getting_started.html is the most obvious place to start.

Creating parallell timeline in Xcode [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am trying to create a schedule in xcode, preferably Objective-C. Basically I will have some sessions over specific times that are going to be distributed over some locations/rooms and I want to have a parallell timeline for each of these rooms.
What I am looking for to create is something like the app Magine (http://imgur.com/gallery/gXwsbzk/).
I figure I will probably need to create a UICollectionViewLayout, but that is pretty much how far my knowledge goes. Any level of guides ot help is greatly appreciated. Maybe there is even an open source class somewhere that accomplishes just what I am looking for?
What I am looking for is obviously something like MSCollectionViewCalendarLayout. Hopefully I'll be able to modify the source code to better fit my needs.

Building a Code Generator in ruby.. Where to start? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I've been thinking about starting an open source admin panel for rails using the cappuccino JavaScript / Objective-J web framework..
How would I get started?
Are there any resources you can point me to, that explain dynamic scaffolding like code generation?
Thanks and looking forward to collaborating if anyones interested?
Daniel
You may want to take a look # rails_admin. It is a port of Merb Admin. It's still pretty young, but may give you ideas on the approach.
ActiveScaffold has been around for a while too which may be another good reference project.

Resources