Questions tagged as 'ruby-on-rails'

1
answer

How to add a link in the Redmine menu only to logged in users?

I've created a link, at the top of Redmine, for a particular industry. I need to know how to hide this link if there is no user logged in. The button was created in the init.rb file of my plugin containing the following syntax ... menu :top...
asked by 14.03.2014 / 15:11
2
answers

Error starting "Rails Server"

Hello, I'm trying to install Ruby on Rails on Ubuntu and start the server using the rails server I get the following error. felipe@Dumont:~/mo$ rails server /home/felipe/.rvm/gems/ruby-2.0.0-p481/gems/execjs-2.1.0/lib/execjs/runtimes.rb:5...
asked by 05.06.2014 / 04:27
1
answer

Access level and hierarchy when marking a checkboxes

Talk, people, beauty? Can you help me with something? I'll explain: I log in with the admin user and it shows all permissions on the system. As an example, suppose you have 10 (index, show, create, update, user delete and profile). Out of the...
asked by 03.10.2016 / 15:35
2
answers

Nested attributes with rails

I am developing a system for studying, which will allow the creation of a user. This user, in turn, will have an inventory, which will have several items. My question is how to save all these resources at once when accessing the action new...
asked by 17.05.2016 / 20:27
2
answers

Update a specific DIV without refreshing the page

How to update a DIV without giving refresh on the whole page? Previously in rails 2.3.10, the 'remote_function' was used to update an existing div. Now in rails 4.2, since you no longer have the remote_function, how can I do that? Ex: W...
asked by 17.02.2016 / 16:43
1
answer

Ruby on Rails and Javascript

I have the following in the controller in Ruby on Rails: def index @categorias = Categoria.find(:all) end In my View I have the following code to get the categories: <script type="text/javascript"> var teste = <%= @ca...
asked by 17.06.2015 / 20:30
1
answer

What files should be inserted in .gitignore in a Rails project?

I'm starting in Git and also in Ruby on Rails. I created a new project using rails new myapp -d mysql and added it to my GitHub repository. When creating the project rails generates several files. So far so good, but it turns out that...
asked by 26.05.2015 / 16:03
2
answers

How to add more fields to the user table with gem Devise

I would like to know if there is any possibility of adding more fields to the user table generated by Devise because I need to relate it to others, and add more information. Is there any problem in doing so?     
asked by 02.04.2015 / 21:06
1
answer

Rails generator for nested resources

I was searching but did not find any nested resources in Rails. Could anyone tell me if you know any?     
asked by 06.03.2015 / 01:27
1
answer

Problem with Ruby Gem Chartkick

After switching to daylight saving time, I'm encountering a problem with Gem Chartkick . I put my query as follows: Ticket.unscoped.where('created_at >= ? ', Time.now - 10.days).group_by_day(:created_at).count The result returned w...
asked by 28.10.2014 / 18:09