app/controllers/binda/field_settings_controller.rb in binda-0.0.6 vs app/controllers/binda/field_settings_controller.rb in binda-0.0.7

- old
+ new

@@ -23,26 +23,26 @@ def create @field_setting = @field_group.field_settings.build(field_setting_params) if @field_setting.save - redirect_to structure_field_group_field_setting_path( @structure.slug, @field_group.slug, @field_setting.slug ), notice: 'Field setting was successfully created.' + redirect_to structure_field_group_field_setting_path( @structure, @field_group, @field_setting ), notice: 'Field setting was successfully created.' else - redirect_to new_structure_field_group_field_setting_path( @structure.slug, @field_group.slug ), flash: { alert: @field_setting.errors } + redirect_to new_structure_field_group_field_setting_path( @structure, @field_group ), flash: { alert: @field_setting.errors } end end def update if @field_setting.update(field_setting_params) - redirect_to structure_field_group_field_setting_path( @structure.slug, @field_group.slug, @field_setting.slug ), notice: 'Field setting was successfully updated.' + redirect_to structure_field_group_field_setting_path( @structure, @field_group, @field_setting ), notice: 'Field setting was successfully updated.' else - redirect_to edit_structure_field_group_field_setting_path( @structure.slug, @field_group.slug, @field_setting.slug ), flash: { alert: @field_setting.errors } + redirect_to edit_structure_field_group_field_setting_path( @structure, @field_group, @field_setting ), flash: { alert: @field_setting.errors } end end def destroy @field_setting.destroy - redirect_to structure_field_group_path( @structure.slug, @field_group.slug ), notice: 'Field setting and all dependent content were successfully destroyed.' + redirect_to structure_field_group_path( @structure, @field_group ), notice: 'Field setting and all dependent content were successfully destroyed.' end private # Use callbacks to share common setup or constraints between actions. def set_structure