phezco / phez

Phez - the free speech platform
Other
54 stars 15 forks source link

cleaning up code #19

Closed askl56 closed 9 years ago

askl56 commented 9 years ago

I'll keep pushing to this branch, I've been meaning to do more but I'll start properly once work calms down.

phezco commented 9 years ago

Hey @askl56 - cool, thanks for the commits! Did you do a lot of this using Rubocop?

One problem I've found though is that the && syntax instead of 'and' causes problems. Not sure if it's my local setup or what, but I'd prefer we stick with the 'and' syntax instead of && return.

Can you roll back the && changes?

askl56 commented 9 years ago

I've just done a regex for "and" and can't find where you're referring to? It is early in the morning, so it might be me.

phezco commented 9 years ago

Like your change in admin_controller.rb:

      render action: :transactions,
-        alert: "Could not find user with username: #{params[:username]}" and return
+      render(action: :transactions,
+             alert: "Could not find user with username: #{params[:username]}") && return

For some reason the && return syntax causes things to break in my setup.

askl56 commented 9 years ago

Ah ok. I will fix now.

askl56 commented 9 years ago

I've unfixed the && syntax. The next thing I was going to do was start moving logic from views to helpers.