search for: create_unique

Displaying 1 result from an estimated 1 matches for "create_unique".

2012 Nov 06
0
How to get which check boxes has beed unchecked and remove Subscription for them?
...Sales) action Save Subscription create this two subscriptions: @subscriptions = current_user.subscriptions > @apps = App.all > if request.post? > if params[:subscription] and params[:subscription][:app_id] > params[:subscription][:app_id].each do |app_id| > Subscription.create_unique({user_id: current_user.id, app_id: > app_id}) > end > redirect_to root_path > end > end # app_menu.html.erb <%= form_for :subscription do |f| %> # this form goes to app_menu action > above > <ul> > <% @apps.each do |app| %> >...