All Questions
Tagged with ruby-on-rails object-oriented
10 questions
4
votes
2
answers
152
views
Ruby CLI TicTacToe
I have done Tictactoe game in Ruby. It is my first Object Oriented project in Ruby. I would like to separate all program into a few classes such as Player Board and Game. I want to use more OOP best ...
1
vote
2
answers
274
views
Refactoring Ruby recharge REST API wrapper by using class variables
I am trying to create an API wrapper for recharge (A Shopify subscription service), I am using the HTTParty gem
...
2
votes
2
answers
219
views
Modelling football teams and fixtures in Ruby (as compared to SQL)
I am trying to model information around football teams and fixtures. I am using the Premier League fantasy football API for my data. The fixtures API is here, and the team data (along with a lot of ...
1
vote
1
answer
720
views
Creating an associated object on create/update
My app is setup where there are musical artists and albums have message boards through a has_one polymorphic association.
...
3
votes
1
answer
81
views
Ensure multiple steps work/saving multiple models via a service
I just thought of something new re: saving multiple objects in Rails (though Rails is not necessary).
Objectives:
Create an author and a tomato, but both of those must be valid.
If invalid creation, ...
1
vote
1
answer
60
views
Old and new shouts controllers
I have a photo_shouts_controller.rb and text_shouts_controller.rb which both have almost similar implementations, and I would like to refactor it.
I have implemented a refactoring but I am not too ...
3
votes
1
answer
66
views
Classes for attributes validation
I have two classes responsible for attributes validation:
...
2
votes
1
answer
91
views
Content management system for media
I have a content management system for an iOS app built with Rails. Right now there are three different types of content. The first two are just strings uploaded into a textfield by the user. One is ...
4
votes
1
answer
7k
views
Searching over more models rails
I'm trying to implement search over two models. In this example Book and Article. Here are the attributes from both of these :
<...
2
votes
1
answer
199
views
Duplicating Rails model for a form with meta-programming
Can someone please review my code:
...