Tagged Questions
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.
-1
votes
2answers
15 views
Is there any gem for creating payslip in ruby?
I am having problem how to create payslip for employees.Is there any gem or api for creating payslip for rails applications.Please share your ideas.
0
votes
3answers
17 views
How can I put conditionals in my controller?
I'm having problems when I'm trying to put a condition in params in my controller. This code is inside my controller:
if params[:example] == 1
@table = ...
0
votes
0answers
10 views
Rails best practice to use polymorphic association
I'm actually creating a taxonomy system into my application. Here is my tables schema :
Taxonomies
class CreateTaxonomies < ActiveRecord::Migration
def change
create_table :taxonomies do ...
0
votes
1answer
24 views
Difference Between Gemfile and Gemfile.lock?
I am a beginner in Ruby on Rails and I'm Using Rails4
What is the difference between Gemfile and Gemfile.lock in Rails?
0
votes
1answer
8 views
Making jQuery works with Turbolinks
I have a Rails 4 app, which uses Turbolinks. My understanding is that Turbolinks breaks jQuery code, as Turbolinks does not load new page, but only get new elements.
Therefore, navigating to new ...
0
votes
0answers
7 views
get the content type of an email attachment in ruby on rails
I need to get the content type of an attachment which is sent to email...I am attaching it from my local drive.. How do I get the content type of that to save it in the db... In the mailer file, I ...
-2
votes
0answers
23 views
SystemStackError: stack level too deep (Active Record)
Recently been presenting a recurrent error with RoR, it is "SystemStackError: stack level too deep", I can't find the origin or the reason for that :'(, the error only occurs in development mode, ...
0
votes
0answers
11 views
How to retrieve user's input label of drop down list in rails 3.2?
The following simple form takes user input with a drop down list of zone. The zone_id of user input could be retrieved with params[:controller][:zone_id].
<%=f.input :zone_id, :label => ...
0
votes
0answers
25 views
JSON coming back undefined on AJAX callback
I'd like to return JSON data for the object I just created through an .ajax() callback, but it keeps coming back undefined which makes me believe I'm doing something wrong in my create action. Here it ...
0
votes
2answers
20 views
why do we have use Model.new for def new and def create?
following the RailsTutorial book (http://ruby.railstutorial.org/chapters/sign-up#sec-signup_form)
we have the following snippet:
def new
@user = User.new
end
def create
@user = ...
0
votes
1answer
18 views
js with erb produces syntax error, unexpected ';'
I had JS file that was included in the Rails 4 app. Then I added Ruby logic to the JS file and renamed it to ERB. In my html.erb template I have something like this:
<% content_for :head do %>
...
0
votes
0answers
7 views
collection_radio_buttons how to set html options
in the code snippet below:
....
...
I wonder how to do
1. how to set html options ?
2. the collection_radio_buttons will generate html code which displays in 4 lines, how to make it display in ...
0
votes
1answer
21 views
Cannot seem to use development database
I updated my database.yml file to look like so:
test:
adapter: postgresql
encoding: unicode
database: startpoint_test
hostname: localhost
pool: 5
username: postgres
password: password
...
0
votes
1answer
15 views
Heroku deployment error - 'We're sorry, but something went wrong"
I'm getting the error "We're sorry, but something went wrong" when I navigate to my heroku app after deployment. These are the logs from after running git push heroku master and then from after ...
1
vote
0answers
11 views
Rails 2 -> Rails 3 upgrade fails with complaints about associations
I've been struggling with this issue for a while and I just can't get a handle on it.
I've got a site which runs fine on Rails 2.3.18/ruby1.8.7
I'm trying to get it to Rails3. I've followed the ...