How do I send a javascript array to my controller?
Hello everyone, is there any way I can send a javascript array straight to my rails controller? Thx!
Eduardo Trintin postedHello everyone, is there any way I can send a javascript array straight to my rails controller? Thx!
Eduardo Trintin postedHello everyone, question. I have the following code: class Country < ActiveRecord::Base has_many :cities, dependent: :destroy accepts_nested_attributes_for :cities end class City < Act...
Harris Mariano postedThis forum is completely worthless
WoodbineOne repliedYou can't save `street` to the Patient model if you don't have have a column with that name. You said you were using a separate table to store the addresses, so you would need to use a nested for...
Chris Oliver repliedHi there, I am following this tutorial to do multiple file uploads with DropboxJS but I don't know how to get multiple images belonging to a model to show in the 'show' page. Only one image shows ...
Arthur Truong postedHi guys, I want to use Devise for creating users with mobile app via REST API but I also want use it in classic fashion. So in API I want to return JSON and appropriate HTTP codes. Also I want to i...
Jaroslav Horák postedHi I am building a website ("All-In-One") with articles publishing and a chatroom. The basic is done and apparently, everything works. So, now I'm working on better styling and details. here is the...
Bina Darabzand postedHi there, I am following this tutorial to do multiple file uploads with DropboxJS but I don't know how to get multiple images belonging to a model to show in the 'show' page. Only one image shows ...
Arthur Truong postedCan I know when I run "rails db:migrate" its updating mysql and schema but not in migration folder files. Also "rails db:migrate VERSION=0" is not working...
Semicolon postedI am new to ruby on rails, can please guide me, when I run migration my schema.rb has a character set = latin1, I wanted it to be utf8mb4, how to set this by default.
Semicolon postedIs it a good practice if we can call a REST api on `before_action` hook of `application_controller.rb` and store the response in helper method? My Scenario is that I wanna call an API from another...
Ali Ahmed replied • SolvedHi, my question is simple that sometimes I have to extend my model with methods that are usually for more advance business logics and sometimes I need some methods that are used in views (not speci...
Ali Ahmed postedI fixed it by changing the params from clinics_attributes: [:id, :clinic_logo, :clinic_name, :clinic_address, :clinic_zip_code, :clinic_municipality, :clinic_about, :clinic_mail, :clinic_...
Kasper Valentin replied • SolvedThe reason APIs are versioned is because you can do these validations on the API level rather than in the model. You would say that in v2, we'd ignore the `a` parameter now, even if you still submi...
Chris Oliver repliedI changed the sort in the view as follows and everything works. <%= form.fields_for :prospect_calls, form.object.prospect_calls.sort_by(&:call_date) do |p| %>
William Jones replied • SolvedI am creating a Stripe product that gives the buyer an option to put a deposit down then they are given x amount of months to pay. Or they can pay in full. I'm sure that I would use scheduled subsc...
Jim Miller replied • SolvedI have been watching about the [How to buil apis with rails series](https://gorails.com/series/how-to-build-apis-with-rails) as a reference on how to create an API. Though I'm wondering on how can ...
norman santiago postedI'm trying to display only the time in the edit form on my application, but I'm getting this: 2000-01-01 01:00:00 UTC What I want is this: 01:00 How can I achieve this? thanks in advance P.S.:...
Francisco Muñoz postedI'm implementing ActionCable in my Rails app. I'm facing an issue with Registered Connection error. I'm using MongoID in my Rails app. Here is my `connection.rb` ``` module ApplicationCable cla...
Lee Terng Gio postedI’m trying to split my rails devise edit form into 3 pages. But when I hit the submit button nothing happens and nothing gets saved. Any help would be much appreciated :-) I have created 3 edit pa...
Kasper Valentin replied • Solved