Ruby on Rails is an open-source web development framework optimized for programmer happiness and maintaining sustainable productivity. Many things are defined by convention, freeing you from having to re-invent things to stay productive.

learn more… | top users | synonyms (1)

-1
votes
0answers
19 views

RoR - Cleaner way to stop nil errors

Not that this is awful, but is there a better way to do the below? (post.content || "").html_safe
0
votes
1answer
25 views

Rails engine testing - use dummy app or real parent app?

I'm using Rails engines to break up a big app into smaller pieces. The parent app mostly handles users and authentication. In one of my engine tests I want to log in a user before each test. How ...
-1
votes
0answers
16 views

Dependency issues when setting up Heroku Toolbelt in linux [closed]

I've been trying to setup the Heroku toolbelt on my linux system. When I run the script, I always get a list of dependencies for heroku and foreman that looks like this: Building dependency tree ...
-1
votes
0answers
11 views

Connecting Ruby on Rails web app to objective C mobile app [closed]

We are currently trying to add an API to a mobile app (objective c) and a web app (ruby on rails to send info to a SQLite database, however I am unsure if this API needs to go on just the mobile and ...
0
votes
0answers
31 views

One huge rails webapp or many small webapps?

We have a huge system to develop, it has 3 main functions: API provider Worker to automated data retrieval Management of data built in workers They all share the same DB, but for scalability ...
0
votes
0answers
33 views

Ruby on Rails - branding

I am working on a website, which is to have multiple brands. The core functionality for all brands will be the same, however there will be a number of differences between them. Those differences may ...
0
votes
0answers
15 views

Change of session/context in rails application

I'm currently developing an app in Ruby on Rails with a social network side, and have several different models including users, groups and pages. I would like to allow users to be group/page admins, ...
2
votes
1answer
2k views

Rails - How to use modal form to add object in one model, then reflect that change on main page?

I'm working on a Rails app and I've come across a situation where I'm unsure of the cleanest way to proceed. I posted a question on SO with code samples and such - it has received no answers, and the ...
0
votes
3answers
127 views

Need advice on design in Ruby On Rails

For personal educational purposes I am making a site for a conference. One of the object that exist in a conference is a session, which has different states and in each state it has slightly different ...
0
votes
2answers
168 views

help me understand Rails and attributes as class methods

This is from the Hartl Rails tutorial. We are automatically logging in a user in the process of creating that user with a callback to #create_remember_token. It works great but there are some things, ...
0
votes
0answers
51 views

Extracting models into a external dependency

About 9 months ago, I asked a question about creating a service layer for my application. Unfortunately, in the ensuing time, no progress in that area was made, primarily due to time constraints. As ...
0
votes
1answer
80 views

Create a loop that visits every link on a site [closed]

I want to create an HTML scraper in Ruby on Rails and I want to implement a progress bar and an ability for it to pick up where it left off if it's interrupted while scraping. I think the best way to ...
23
votes
2answers
9k views

We have a large Ruby on Rails application (25 million monthly users), our management decided to rewrite in Node.js, am I crazy?

Please tell me if: Node.js will make our site faster! Node.js will consume fewer server resources, we can save money! Node.js will make us more productive! Node.js means we can share client and ...
1
vote
4answers
231 views

If I use Ruby Migrations, do I have to use the rest of Ruby on Rails?

I'm currently trying to come up with a database migrations strategy for my organization. This includes getting the database scripts into source control, managing versioning, managing releases to QA / ...
37
votes
12answers
5k views

Has test driven development (TDD) actually benefited a real world project?

I am not new to coding. I have been coding (seriously) for over 15 years now. I have always had some testing for my code. However, over the last few months I have been learning test driven ...
1
vote
3answers
228 views

Why does Rails do config in code?

According to the Pragmatic Programmers, code should be for abstractions, while configuration and details should live in metadata. Rails seems to diverge dramatically from this pattern. Much config is ...
1
vote
1answer
175 views

Should an object update itself?

I'm working on Ruby on Rails. There is a feature in our app where doctors can "claim" cases for themselves. I can either have the doctor perform the action and update the plate, or I can have the ...
-2
votes
1answer
807 views

Advantages and disadvantages of PHP/Ruby [closed]

I've been a front-end developer for about two years now, and I'm attempting to break into the server side of things. Ideally I'd like to work for a startup social network on the back-end side so I ...
8
votes
4answers
4k views

Why was Rails written in Ruby? [closed]

I know PHP and Ruby. Using a PHP Rails clone (not out of choice), called Symfony, (which is apparently the best PHP framework), I notice that it's a clone of Rails. I think Symfony is stupid and ...
1
vote
0answers
31 views

Rails: get data about a model collection, with new model or method?

have a model Product with attributes sales, views and I need to get sales/views count of all products, in this case is more correct to implement this things as method and have a call like ...
0
votes
1answer
172 views

Ruby on Rails database using static lookup tables or constant strings

In some ruby on rails projects, I have seen instances where strings are used instead of a foreign key reference to a lookup table. I usually code in C#/SQL Server and use lookup tables, but am not ...
2
votes
1answer
191 views

Designing and refactoring of payment logic [closed]

Im currently working on an application that helps users to coordinate dinner clubs and all related accounting. (A dinner club is where people in a group, take turns to cook for the rest and then you ...
47
votes
15answers
5k views

How much freedom should a programmer have in choosing a language and framework?

I started working at a company that is primarily a C# oriented. We have a few people who like Java and JRuby, but a majority of programmers here like C#. I was hired because I have a lot of experience ...
0
votes
1answer
113 views

How should developers go about managing complex plural words with ActiveRecord?

I'm playing with pluralize at the command line, and it's beginning to scare me. Multiples of leaf is leafs (not leaves) Multiples of cactus is cactus- not cacti, or even cactuses. Radius becomes ...
1
vote
1answer
159 views

Dealing with 'dirty' Ruby on Rails client

I had to leave a startup about a month ago because of lack of funding. Basically, this client wanted an application to allow contractors to create, update, read, and delete yardsigns. Straight forward ...
0
votes
1answer
108 views

Is api user authentication with oauth possible for both email/pw and 3rd party services

I have an api only application (rails-api) and I'm looking to authorize a user on both email/password or 3rd party services like facebook or twitter etc, so I know I will have to use Oauth at some ...
2
votes
1answer
108 views

How to create html pages which don't change very much and not very often?

I have a Rails server that connects to a json API on another server to get data to build the pages dynamically. These pages, however, don't change very much and not very often. I was thinking I could ...
0
votes
2answers
205 views

What is the best way to build a static page web site from a JSON API?

I have a JSON API that includes some discusssions. I want to build a static html site on another server, pages that are built from data on that API. I am more comfortable using Rails than Node. The ...
0
votes
1answer
116 views

Refactoring this code that produces a reverse-lookup hash from another hash

This code is based on the idea of a Form Object http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-fat-activerecord-models/ (see #3 if unfamiliar with the concept). My actual code in ...
1
vote
1answer
58 views

Should I use the new method/action to retrieve records? (Rails)

I have an admin controller that is just used for its index action which renders a view with the most recent updates to certain resources: class AdminController < ApplicationController ...
3
votes
2answers
1k views

What is a Ruby on Rails way to save images?

I develop on iOS, and I'm switching from a PHP backend to Ruby on Rails. The interchange format is JSON. A quick Google search for 'save images in Rails' has nearly every result talking about saving ...
3
votes
4answers
2k views

Ruby on rails not popular in big international IT companies? [closed]

Is the ROR used only in startups or also in bigger companies as well? What should be the reasons of their preference of Java over ROR?
6
votes
2answers
2k views

Ruby on Rails and DRY

I've started to learn a little ROR and everthing I read says that ROR espouses the DRY principle and they seem to imply that this is a big thing that makes ROR different from other ...
0
votes
1answer
217 views

Multiple roles in Ruby On Rails

I've been asked to put together an application in RoR which has multiple roles for users. The idea is that a user will have a role, Admin, Moderator, User ect... and they will also have a department ...
39
votes
10answers
4k views

What are the downsides of RoR? [closed]

I'm currently trying to decide what server-side language to learn and use for web development, and while it's relatively easy to get information on why x, y, or z is a good thing, it's harder to ...
0
votes
1answer
115 views

model association or controller?

I'm trying to create a rails app that allows users to submit information about their pets. I've come to a point where my knowledge is limited and I don't know enough about what/how this could be done ...
1
vote
1answer
183 views

How to build an API on top of an existing Rails app with NodeJs and what architecture to use? [closed]

The explanation I was recently hired by a company that has an old RoR 2.3 application with more than 100k users, a strong SEO strategy with more than 170k indexed urls, native android and ios ...
-2
votes
1answer
507 views

Why would I want to install node.js in my Rails Application? [closed]

Okay guys, I'm super confused. I thought node.js was a sever side framwork, basically the js version of Ruby's Rails or PHP's Zend. However, I'm having some difficulty with turbolinks, and it seems to ...
30
votes
7answers
14k views

What ASP.NET MVC can do and Ruby on Rails can't? [closed]

ASP.NET MVC and Rails have similar area of use, are built around same architecture, both frameworks are relatively new and open source. So as a Rails programmer I'd like to know, what ASP.NET MVC can ...
16
votes
14answers
2k views

How can I defend Ruby on Rails against customers' not technical opinion?

My customer, a translations business owner, just told me that he has been reading about Ruby on Rails and told me that "there are more PHP guys around there" and "it seems the community prefers it". ...
0
votes
0answers
18 views

Rails: The Law of Demeter [duplicate]

I am reading a book called Rails AntiPatterns and they talk about using delegation to to avoid breaking the Law of Demeter. Here is their prime example: They believe that calling something like this ...
-1
votes
2answers
601 views

Rails/Node.js interaction

I and my co-worker are developing a web application with rails and node.js and we can't reach a consensus regarding a particular architectural decision. Our setup is basically a rails server working ...
6
votes
4answers
512 views

Rails: Law of Demeter Confusion

I am reading a book called Rails AntiPatterns and they talk about using delegation to to avoid breaking the Law of Demeter. Here is their prime example: They believe that calling something like this ...
2
votes
1answer
213 views

Rails: Useful example of delegate and Law of Demeter

I am currently learning about delegate and the Law of Demeter. I understand the Law of Demeter, but I can't seem to find a good example of where using delegate to avoid breaking the law would actually ...
0
votes
0answers
126 views

Creating a new database with Active Record

Please tell me if this is mad, but basically, I've created a custom rake task, and before it does its thing, it gives the user a warning message: Warning, please back up your database before ...
3
votes
2answers
777 views

How can web development bootcamps deliver on their promise?

I came across the concept of web development bootcamps, these 9-10 week intensive crash courses claim to teach beginners web development and help them get 80k starting salary jobs. Many of you might ...
0
votes
1answer
100 views

How to handle licensing of Ruby on Rails code, which contains a LGPL library?

My company wants to release the code for a Ruby on Rails demo app, which includes our own LGPL'd library code. It it legally kosher for me to state that the contents of the entire repo are released ...
0
votes
0answers
62 views

What are the pros and cons of running multiple instances of an app per marketplace?

One app to rule them all, and in the darkness, bind them. I'm speccing out a client app at the moment. The same service is to be delivered to two separate counties and the the content within: users, ...
16
votes
10answers
7k views

Is Ruby on Rails supposed to have a steep learning curve or is it just me? [closed]

I'm a self-taught programmer. I've been learning RoR since October with varying intensity (sometimes all day, sometimes nothing for several weeks). Before that I knew only Java, but knew it pretty ...
2
votes
1answer
112 views

Storing different algorithms and using them for demonstration

I have an app for creating simple graphs (the kind with vertices and edges) and then using different algorithms on them (BFS, DFS, topsort, Prim's etc) for demonstrating how they work. I'm now ...