-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am looking to reproduce the following with Formtastic:
<% form_tag '/search', :method => 'get' do %>
<%= text_field_tag :q, params[:q] %>
<% end %>
So far I have:
<% semantic_form_for :search, :html => { :method => :get } do |form| %>
<% form.inputs do…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I searched and tried a lot, but I can't accomplish it as I want.. so here's my problem.
My models are:
class User < ActiveRecord::Base
has_one :profile
accepts_nested_attributes_for :profile
end
class Profile < ActiveRecord::Base
attr_accessible :user_id, :form, :title, :name, :surname…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
We've all seen the brilliant complex forms railscast where Ryan Bates explains how to dynamically add or remove nested objects within the parent object form using Javascript.
Has anyone got any ideas about how these methods need to be modified so as to work with Haml Formtastic?
To add some context…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm using the Formtastic Rails gem in my app and its been great, but I would really like to add a second button, other than the bundled "commit" button that redirects back. I can't seem to find any information on how to add a custom button. Any information would be greatly appreciated!
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I've been using formtastic in order to generate HTML forms on rails applications. My question, however, is really HTML-related.
Today I found a strange behaviour on the way formtastic generates checkboxes (fields of type :boolean on formtastic lingo).
The rest of the fields (non-checkboxes) are…
>>> More