0

This is a headscratcher for me, a search on google yields no results so I'll try here. I'm doing a rails app and using the datepicker plug in, so I can see a calendar view when I select my date on a form_for. Everything works fine, as long as I'm not using strong_params. Because I'm using the latest version of rails, I need to use the strong_params. But when I do, the calendar no longer pops up after selecting the date. What could be the reason for this, and how can I circumvent this problem?

class RemindersController < ApplicationController
  def new
    @reminder = Reminder.new
  end

  def create
    @reminder = Reminder.create(:date => params[:date])
    flash[:created] = "You've scheduled a reminder"
    redirect_to "/users/#{current_user.id}/reminders/#{@reminder.id}"
  end


  def show
    @reminder = Reminder.find(params[:id])
  end

  # private

  # def reminder_params
  #   params.require(:reminder).permit(:title, :content, :phone, :date)
  # end

end
nhahtdh
  • 55,989
  • 15
  • 126
  • 162
ChrisPalmer
  • 285
  • 4
  • 15

0 Answers0