Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix saving search list #1305

Merged
merged 3 commits into from
Jul 19, 2024
Merged

Conversation

stanleylhs
Copy link
Member

Updated model with optional and controller saving with attr

@stanleylhs stanleylhs requested a review from steveyken July 17, 2024 03:57
@stanleylhs stanleylhs force-pushed the fix-search-list branch 6 times, most recently from 37fc2a5 to df2e894 Compare July 17, 2024 04:27
@stanleylhs stanleylhs marked this pull request as draft July 17, 2024 04:28
@stanleylhs stanleylhs marked this pull request as ready for review July 17, 2024 04:29
@CloCkWeRX
Copy link
Member

This could do with a test to show the bug

@steveyken
Copy link
Member

We were missing some specs for ListController so I've added those now.

@@ -8,4 +8,45 @@
require 'spec_helper'

describe ListsController do

Check notice

Code scanning / Rubocop

Keeps track of empty lines around block bodies. Note test

Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning.
let(:list_url) { "/contacts?q%5Bs%5D%5B0%5D%5Bname%5D=&q%5Bs%5D%5B0%5D%5Bdir%5D=asc&q%5Bg%5D%5B0%5D%5Bm%5D=and&q%5Bg%5D%5B0%5D%5Bc%5D%5B0%5D%5Ba%5D%5B0%5D%5Bname%5D=first_name&q%5Bg%5D%5B0%5D%5Bc%5D%5B0%5D%5Bp%5D=cont&q%5Bg%5D%5B0%5D%5Bc%5D%5B0%5D%5Bv%5D%5B0%5D%5Bvalue%5D=test&distinct=1&page=1" }

describe "global list items" do
let(:list_name) { "Global list item"}

Check notice

Code scanning / Rubocop

Checks that block braces have or don't have surrounding space. For blocks taking parameters, checks that the left brace has or doesn't have trailing space. Note test

Layout/SpaceInsideBlockBraces: Space missing inside }.
spec/controllers/lists_controller_spec.rb Dismissed Show dismissed Hide dismissed
end
it "updating should be successful" do
@list = List.create!(name: list_name, url: "/test")
post :create, params: { list: { name: list_name, url: list_url }, is_global: is_global }, xhr: true

Check notice

Code scanning / Rubocop

Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1, :b => 2 }. Note test

Style/HashSyntax: Omit the hash value.
end

describe "personal list items" do
let(:list_name) { "Personal list item"}

Check notice

Code scanning / Rubocop

Checks that block braces have or don't have surrounding space. For blocks taking parameters, checks that the left brace has or doesn't have trailing space. Note test

Layout/SpaceInsideBlockBraces: Space missing inside }.
spec/controllers/lists_controller_spec.rb Dismissed Show dismissed Hide dismissed
expect(response).to render_template("lists/create")
end
end

Check notice

Code scanning / Rubocop

Keeps track of empty lines around block bodies. Note test

Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end.
@CloCkWeRX CloCkWeRX merged commit ec5f66b into fatfreecrm:master Jul 19, 2024
8 checks passed
@stanleylhs stanleylhs deleted the fix-search-list branch July 23, 2024 08:24
@stanleylhs stanleylhs restored the fix-search-list branch July 23, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants