Ruby on Rails is an open source full-stack web application framework written in Ruby. It follows the popular MVC framework model and is known for its "convention over configuration" approach to application development.

learn more… | top users | synonyms (2) | ruby on rails jobs

0
votes
0answers
10 views

Array with multiple values using SQL & Rails

I've been trying to figure this out all night. Basically, I'm trying to return an array like this array[0] # => ["1", "hi"] array[1] # => ["2", "hey"] array[2] # => ["3", "hello"] Using ...
0
votes
2answers
20 views

What's the difference between “validate” and “validates”?

Backstory: I'm using Rails 3.2.13. I was adding validations to one of my objects using validate :field, presence: true. When I went to test these I found they weren't actually given error messages. ...
0
votes
0answers
8 views

Rails sort by association's time attributes

it is more complex but I am gonna simple it first, I have some record, their start_time can be post or future, I want sort them by start_time but a little diff: the future record come first and then ...
0
votes
1answer
11 views

Nokogiri get xpath from Nokogiri::XML::Element

How to get xpath for rc an element returned by search f=File.open('/media/cc.xml') doc = Nokogiri::XML f rc = doc.search('realmCode') [#<Nokogiri::XML::Element:0x15a4d714 name="realmCode" ...
-1
votes
0answers
8 views

How do i implement jqgrid in rails with insert, delete, delete, create functionality/methods?

I am trying to implement jqqrid in rails application but not able to delete functionality, Could you please help me to solve this?
0
votes
2answers
11 views

Paperclip: width is 100%, height is 60% of width

How would I write a Paperclip style to keep the width of the uploaded image at 100% but crop only the height to 60% of the width? Something like this: has_attached_file :image, :styles => { ...
0
votes
1answer
19 views

calling a method in a model from another controller in rails 3

In my rails application I need to call a method defined in one table from another controller. There are two tables named coordinates and tweets. The condition for the tweets table is decided by the ...
0
votes
2answers
7 views

couldn't find file 'jquery-ui' after installing correct gem files

This is my gemfile source 'https://rubygems.org' gem 'rails', '3.2.13' gem 'jquery-rails' gem 'pg' # Gems used only for assets and not required # in production ...
0
votes
2answers
14 views

How to add an empty attribute in rails form_for tag?

To make foundation validations work, I have to add the 'data-abide' attribute to form tag like this : <form data-abide> How can I do this using the form_for tag in rails? The full rails code ...
0
votes
0answers
17 views

Rails Mysql to Postgresql Float

I'm transferring my database from mysql to postgresql. I have a latitude and longitude column for one of my models: t.float :latitude t.float :longitude I'm using mysql2psql gem to load the ...
0
votes
1answer
14 views

How to send mail for multiple models in rails

I am new to rails. I am having problem in mail sending to multiple models. Our project contains parent,teacher and student models.each module having number of users(student,parent,teacher). And also ...
0
votes
1answer
8 views

Cache ajax response for loading records - Rails 3

I have the following code which retrieves the current users notifications and renders a partial each time the #notifications link is clicked via ajax. . How can I cache the ajax response so that, ...
0
votes
0answers
8 views

OSX Local Server Setup

I recently setup a local server on my mac. I have rails and ruby and rack installed and running. But I'm unsure of how to direct incoming request or have a rails app take control. How do I move ...
0
votes
0answers
10 views

How to save importing csv files in public folder?

I am new to rails. I am having problem for not saving imported csv files in public folder. And I written .rake file in task folder. tasks/employee_attendance.rake file require 'csv' task ...
0
votes
0answers
10 views

Rails app with SEO keywords in the URLs

I have a non trivial Rails 3.2 app (it has several sections alongside with a shop managed by Spree Commerce). Because of a SEO consultation we received, we need to change the URLs, which now look like ...

1 2 3 4 5 8355
15 30 50 per page