[Rails] Respond with JS on create-success, otherwise respond with HTML

2013-07-02 Thread why-el
Hey fellas, Is there a way to selectively respond with a format depending on whether there were errors creating an object or not? My goal is to *have a remote form fall back to the html version of the 'new' action if there were errors*. In other words, run the create.js.erb if the save

[Rails] Add data in between Simple Form association members

2013-01-04 Thread why-el
Hey there, I am trying to use Simple Form's association to list a bunch of radio buttons like so: %= simple_form_for(@applicant) do |f| % %= f.association :track, :as = :radio_buttons % % end % Assuming each track has many courses, how can I take every track from that association

[Rails] Multiple checkboxes for a has_many through not saving

2012-12-25 Thread why-el
*I Copied this from StackOverflow since I did not get any response there. There is an update at the end. * I am not sure why my checkboxes for a has_many through are not saving. This is a rather complex form (An online application for a language summer program) so in addition to regular

[Rails] One model or many for a multistep form?

2012-12-20 Thread why-el
Hey fellas, I am trying to put together a small app to help my university accept applications for one of its summer programs. Currently, they send you an application, you print it, you fill it, scan it, then send it back! We can't tolerate this in a world of Rails. Anyway, so the giant form

[Rails] Hosting costs for a small up!

2012-11-09 Thread why-el
Hey friends! I am in the process of drafting a funding proposal to submit to my university and I have no idea what costs I should include for my Rails app. My application will open to my university's students. We are about 1600 students, so the app will handle few requests. The stack is a

[Rails] Problem passing id of parent model to child

2012-11-01 Thread why-el
Hey fellas, I have an Organization model with many projects. I have a link to a new project from the organization's show view, like so: new_organization_project_path (@organization). I was hoping Rails would get the id of the organization from the instance I am passing and populate

[Rails] Re: Problem passing id of parent model to child

2012-11-01 Thread why-el
/routing.html#nested-resources //Linus Den torsdagen den 1:e november 2012 kl. 22:02:36 UTC+1 skrev why-el: Hey fellas, I have an Organization model with many projects. I have a link to a new project from the organization's show view, like so: new_organization_project_path (@organization