Posts by Vinícius Venancio dos Santos • 329 points
18 posts
-
2
votes2
answers514
viewsQ: Nested Attributes with Rails
I’m developing a system for study, 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…
-
0
votes1
answer48
viewsQ: Form Many to Many Rails
I’d like to know how to make one form Many to Many in Rails. Here are my models: class Course < ActiveRecord::Base has_and_belongs_to_many :notices, dependent: :destroy has_and_belongs_to_many…
ruby-on-railsasked Vinícius Venancio dos Santos 329 -
0
votes1
answer75
viewsQ: Parcelable Android
I need to make the Parcelable of this class, but it’s giving the error: class not found when unmarshalling Could you help me? My class: public class Internship implements Parcelable { private…
androidasked Vinícius Venancio dos Santos 329 -
1
votes1
answer86
viewsQ: I cannot create a new Activity
I’m doing a project that uses the v4 support jar. However, when I create a new Activity, the project gets errors, as it informs that support v7 is required. There is possibility to continue…
-
1
votes1
answer231
viewsQ: Listview Fragment
The list is loaded into the Fragment with the selection of the Actionbar menu item. However, when I click on a different tab than the one that has Fragment with the list, and return to the tab with…
-
0
votes0
answers56
viewsQ: Null Pointer Android
While running the application, this Adapter error appears: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.LayoutInflater.inflate(int,…
-
0
votes0
answers215
viewsQ: Loading Listview via an API
When I run the app, Listview is not displayed on the screen. Is Volley not doing the request? or am I doing the wrong JSON Parsing? Main Activity: public class MainActivity extends FragmentActivity…
-
1
votes1
answer279
viewsQ: android.widget.Linearlayout cannot be cast to android.widget.Listview
When running my application, this error appears: 05-28 05:33:33.773: E/AndroidRuntime(28824): java.lang.RuntimeException: Unable to start activity…
-
0
votes1
answer147
viewsQ: Composite index - M:N in Ruby on Rails
I need to add a double index to the ratio N to N, from the table courses_internships. would be more or less like this: add_index[:course_id, :internship_id]. However, when I created the link table,…
-
0
votes2
answers67
viewsQ: Rails does not accept request
I set up a simple API in Rails, it only reads the database, and returns the JSON according to the request. However, I went to test the API, making a request with another device, connected via…
-
0
votes0
answers496
viewsQ: Undefined method 'map' for nil:Nilclass
I’m having this problem if the validator finds an error after submitting the form. I think it might be because my instance variable, @users, is nil? I know it in the controller with before_action,…
-
1
votes1
answer886
viewsQ: How to allow only the administrator to register a user with Devise
I wanted to know if there is only the administrator register user, with Devise. I can not program this. And where is the controller with the Devise methods in the project?
-
1
votes1
answer70
viewsQ: How to leave this DRY code block in Ruby
I got this code pad right here: if contract.amendments.empty? if Date.today - contract.due_date >= 30 || Date.today + contract.due_date <= 30 @start_date = contract.due_date + 1 @end_date =…
-
9
votes2
answers647
viewsQ: How to use Ruby blocks
I’m having a hard time understanding blocks in Ruby. Could someone explain to me why we use it?
-
1
votes1
answer108
viewsQ: How to model a comment system
I am developing an application in Rails. I would like to know how to model the comments part. There is a table for the calls( Helpdesk system ), and the same relates to the history table, which are…
-
2
votes2
answers490
viewsQ: Adding more fields to the user table with Gem Devise
I wonder if there is possibility to add more fields to the user table generated by Devise because I need to relate it to others, and add more information. Is there a problem in doing so?
-
2
votes1
answer337
viewsQ: Is it advisable to have a Users table relating to others?
I am beginner in systems development, and I would like to know if the table of users of the system could establish relations with other tables, as for example, the table of company.
-
0
votes1
answer1942
viewsQ: How do I connect to an existing Rails database?
I wonder if there is how to connect to Postgresql, so I only read the data of the tables that are already created. I am developing an API, which will read in a given database, and return an XML, for…