FAQ Database Discussion Community


When I click submit button in my form, create action is supposed to work but it is rather processed by new action

ruby-on-rails,simple-form,simple-form-for
In my application, I have a form that is supposed to be processed by create action but it is rather processed by new action. This problem is happening in my post task form, but in my other form (registration form), it is working very well (it is processed by create...

html rows mis-aligned with simple_form 2.1.2 and bootstrap 3/Rails 3.2

html,ruby-on-rails-3,twitter-bootstrap,simple-form,simple-form-for
Here is a html page rendered through simple_form 2.1.2 with 3 mis-aligned rows on bootstrap 3 and rails 3.2. We know that bootstrap 3 is not compatible with simple_form 2.1 and rails 3.2. The html source code of all rows have the same structure (difference name of course). Also we...

simple_form inline on rails 4

ruby-on-rails-4,simple-form,simple-form-for
I am using a simple_form and bootstrap in rails 4. I want the start date and start time to be on the same line and end date and end time on the same line. I have tried the solutions from similar problems but none of them are working. I am...

Rails - Simple Form - Nested Resources paths

ruby-on-rails,simple-form,simple-form-for
I am trying to make an app in Rails 4 using simple form. I have 3 models: Project, Project_Question, Project_Answer The associations are: Project: has_many :project_questions, dependent: :destroy#, through: :projects accepts_nested_attributes_for :project_questions Project Question: belongs_to :project#, counter_cache: true has_one :project_answer, dependent: :destroy belongs_to :user accepts_nested_attributes_for :project_answer Project Answer: belongs_to :project_question#,...

Bind '.error' class to manually created haml wrapper

ruby-on-rails,haml,simple-form-for
I have next group of controls: .control-group.string.required.user_name = f.input_field :name, required: true, class: 'form-control' = f.label 'User Name' = f.error :name Is there any way to bind '.control-group' to it's child input, so if input is invalid, wrapper will get class ".error" added? Thanks...