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)

2
votes
1answer
1k views

Is it bad form to change multiple tables in a single Rails migration file?

I wrote a migration file with the following code: class AddScheduleIdToPlayers < ActiveRecord::Migration def change add_column :players, :schedule_id, :integer add_column ...
6
votes
1answer
2k views

Performing client-side OAuth authorized Twitter API calls versus server side, how much of a difference is there in terms of performance?

I'm working on a Twitter application in Ruby on Rails. One of the biggest arguments that I have with other people on the project is the method of calling the Twitter API. Before, everything was done ...
1
vote
2answers
494 views

What is faster and preferable way for variable assignment in ruby? [closed]

I am a RoR developer and want to clarify some doubt about ruby variable assignment. In ruby we have two ways for variable assignment. str, arr, num = "Hi", [1, 2], 3 and str = "Hi" arr = [1, 2] ...
1
vote
1answer
294 views

Applying for job: how to showcase work done for (private) past clients?

I want to apply for my first "real" (read: non-freelance) Ruby on Rails job. I've built several apps already. My best work (also the most logically complicated app) was for a freelance client, and ...
2
votes
2answers
416 views

Should I prefer instance methods over class methods in Ruby?

I'm working on a rails application, and I've been pulling functionality out of my rails code and into pure ruby classes in lib/. I've found myself often writing classes like this: class ...
1
vote
2answers
905 views

Is it worth converting a Django project to Rails?

I have a project I shelved a while back- it was essentially a working web app built in django but I stopped working on it to work on something else. I plan on starting it up again in my spare time, ...
1
vote
2answers
842 views

How do I read API documentation?

I've been trying to read through the RoR API to try to learn things that the tutorial missed, and I haven't been able to follow it at all. The only time I've read documentation was when I needed to ...
1
vote
3answers
269 views

Ruby/RoR development: desktop or server [closed]

Our company has started development of own systems "in-house". We already got couple of developers, who will be responsible for writing code in Ruby/RoR. We are currently discussing infrastructure, ...
2
votes
2answers
1k views

Use a partial in a partial?

I'm a Rails newbie, so bear with me. I have a few places, some pages, some partials that use: <%= link_to "delete", post, method: :delete, data: { confirm: "You ...
4
votes
5answers
5k views

easiest way for push notifications

I wanted to implement real time push notification to one of the apps written in RoR. I don't have any experience with nodejs, nowjs, express or socketio. What would be the easiest way to implement ...
3
votes
6answers
6k views

How much Ruby should I learn before moving to Rails?

Just a quick question.. I can never get a definitive answer when googling this, either. Some people say you can learn Rails without knowing any Ruby, but at some point you'll run into a brick wall and ...
0
votes
1answer
618 views

Convention on model names in ruby on rails

I was doing my ER diagram for a rails application I'm about to begin with and there I have an entity called Class News so I'd have a model ClassNew but I don't know if I will have problems in the ...
-1
votes
2answers
501 views

Am I shooting myself in the foot if I use Mercurial for Rails development?

I'm a Rails developer and I prefer Mercurial over Git. However, I know that the Rails community is very pro-Git. So my question is it possible that my choice of version control system would turn back ...
10
votes
3answers
6k views

Rails - Does using partials slow views rendering?

I'm having performance issues on a Rails 3.1.0 application, now I've done dome changes on my queries with AR and so but views still takes too many time to render, I've divided the views, loops and so, ...
2
votes
3answers
120 views

Post-hoc testing in TDD recommended?

I have a personal project that doesn't have robust testing. I had a bit of TDD going on at the beginning, but it quickly became counterproductive as the project details changed dramatically over time. ...
3
votes
1answer
1k views

Rails application - how to optimize/reduce database calls when iterating over a collection

What's the best way to optimize a Rails app where you need to pull info from the database for a collection of items? For example, if I am building an online forum system... I would have a number of ...
0
votes
2answers
278 views

Structuring a rails application with static data

I'm working on a rails application, and so far I've focused on the api and the functionality. But now I'm more and more reaching a point where I will want to add static content, descriptions of the ...
1
vote
4answers
254 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 / ...
1
vote
1answer
630 views

rails fake data, considering switch from faker to forgery, any advantages or pitfalls?

With Ruby on Rails I've usually used Forgery for generating dummy data for testing. I've noticed recently that several clients and tutorials are using Faker They both seem fairly similar in use ...
3
votes
1answer
130 views

Rails solution for mobile-specific content filter?

To note, I'm not interested in simply 'hiding' content for mobile devices, I want to filter out that content completely. I'm also not trying to address the issue by building a mobile specific ...
-1
votes
1answer
196 views

One man company looking to expand already built in PHP. Is now the time to switch to Ruby? [closed]

I'm a website owner and I develop in Yii so in short, I think I'm working with more or less the "best" PHP has to offer (e.g. PDO, OOP...etc). My primary website (which is not built in any framework ...
9
votes
3answers
3k views

Safe iPhone app ↔ server communication

What would be the best approach to achieving private communication between my iOS app and its server component? Is having a single unchanging “secret key” baked into the app source enough, or do I ...
11
votes
10answers
824 views

How to convince teammates to use TDD

I am the only person on my team that use TDD. How do I make them to use it? I am annoyed that when I pull, someone's code will break my tests and I am the one who has to fix them. Will using github, ...
0
votes
3answers
255 views

How to deal with social login

In my new web app I'm going to allow social login through Twitter (maybe), Facebook and Google and I'm in search of the best way to do it. Actually I'm using Rails with Devise + Omniauth and this is ...
2
votes
1answer
339 views

Am I experienced enough to learn and develop immediately using Ruby on Rails?

General Question I understand that discussions revolving around questions of this form run the risk of becoming too specific to help others. So, perhaps a better, general question would be: What ...
3
votes
2answers
2k views

Rails and Mongoid best way to implement sharing system

I have to model User and Board in rails using mongoid as ODM. Each board is referenced to an user through a foreign key user_id and now I want to add the ability to share a board with other users. ...
1
vote
1answer
415 views

choosing Database and Its Design for Rails

I am having a difficulty in deciding the database & its structure. Let us say the problem is like this. For my product I have various customers( each is an educational institute) Each customer ...
3
votes
3answers
593 views

Why rails use yaml to config database instead of plain ruby code?

Most of configuration files in ruby such as Gemfile, gemspec, are just ruby code itself. Why database configuration file in rails is the exception?
2
votes
3answers
708 views

Backbone.js, Rails and code duplication

I'm building a web app and I need a JS framework like Backbone.js to work with my backend provided by Rails that mostly return JSON objects after DB queries. Searching on the web I've discovered ...
3
votes
1answer
660 views

Is Ruby on Rails' Active Record an example of Aspect-Oriented Programming?

From Clean Code, about Cross-Cutting Concerns: Note that concerns like persistence tend to cut across the natural object boundaries of a domain. You want to persist all your objects using ...
0
votes
0answers
188 views

Rails Book Suggestions [duplicate]

Possible Duplicate: Is there a canonical book on Ruby on Rails? I'm looking to learn Ruby on Rails. I already have a small background in Ruby and don't really need a book that covers both, ...
18
votes
3answers
1k views

Moving away from .Net to Ruby and coping without intellisense [closed]

I am in the process of trying to learn Ruby, however after spending nearly 10 years in the MS stack I am struggling to get by without intellisense. I've given RubyMine a try which does help however ...
12
votes
4answers
2k views

What did Ruby do right (or was it Rails)? [closed]

Most programming languages have some design decisions that influence their usage and applicability. For example: Python focused on maintainability/readability of code and had indentation be a part ...
2
votes
1answer
3k 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 ...
5
votes
4answers
1k views

Where to define view-specific data objects in Rails

Background: there are several places in our app where we want to display date-oriented information on a calendar. The event_calendar gem looks nice and has lots of reviews, so it's what I'm planning ...
1
vote
1answer
704 views

Is PHP a more simple introductory language to back-end web development over Ruby on Rails?

I have a program coordinator for a course I plan to teach who wants to change the "Introduction to Web Development" course from using PHP to Ruby (I assume he means Ruby on Rails). His justification ...
2
votes
1answer
2k views

Rails - to use STI or not…that is the question

Six months ago, I asked a question about modeling data for my app, and received some advice pointing me towards STI (see Rails data model - best practices question for the details). I played around ...
0
votes
1answer
226 views

Client wants to resell the app I programmed [closed]

Not sure if this is the right forum. If it's not, please let me know and I'll move it. So I have been asked by a client to develop a RoR Web App for them. He asked me if the development is their ...
6
votes
4answers
282 views

How viable is it to switch stacks for setting up a startup [closed]

I am currently employed with a company for 2.5 years and I have been working with the .net stack for the entire duration mainly on the MVC framework. I believe I have some cool ideas for a startup but ...
3
votes
2answers
234 views

Managing constants in application

Our application is having 2 parts a web app running ROR and a web service running Sinatra. The application communicates with the mobile device for which we use different constants depending on the ...
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". ...
4
votes
1answer
206 views

Should I refactor this rails application?

I have taken over the code base for a ruby-on-rails application which relies very heavily on ActiveRecord callbacks to perform domain rules. The application can be compared to a bank application, ...
1
vote
2answers
382 views

Strictly from an employability perspective, what is the best web development framework to learn right now? [closed]

Even though Ruby on Rails seems to be the most popular with the most job openings, is there a compelling employability reason to learn django for example? Maybe because everybody's learning RoR and ...
2
votes
4answers
631 views

Best practices for team workflow with RoR/Github for designer + coder?

My friend and I have started to try to collaborate on some projects. For background, I come from a PHP/Wordpress/Drupal coding background, but recently I've become more experienced with the RoR ...
4
votes
1answer
5k views

Why do people suggest not to use instance variable for views in Ruby on Rails

Why do I hear that it is not good to share instance variables between controllers and views. I kind of like it because I can see immediately via the @ that something is coming from the controller. I ...
-3
votes
1answer
2k views

What are the business benefits of Ruby/Rails to tell a client?

I'm programming Ruby. I'm programming Rails. It's zen, it makes fun and it's cool. But what are the real technical and foremost business advantages of Rails, I can tell a client? I know the ...
4
votes
5answers
2k views

What is a practical way to debug Rails?

I get the impression that in practice, debuggers are rarely used for Rails applications. (Likewise for other Ruby apps, as well as Python.) We can compare this to the usual practice for Java or ...
1
vote
3answers
1k views

Rails generators for subscription and payment processing services?

I've been thinking about making a generator for managing subscriptions with options for a couple different payment processing services, it is something that I would use. Are there any existing ...
12
votes
2answers
965 views

Which tasks should a beginner, intermediate and advanced rails developer be able to complete?

I have been programming ROR for about a year now, and I think I am ready to start working on a project for someone else. The problem is that job postings for contractors don't really tell you which ...
5
votes
3answers
219 views

how to deal with controller mutations

During development process, things are constantly changing (especially in early phases). Requirements change, UI changes, everything changes. Pages that clearly belonged to specific controller, ...