Tasks admin tags - WIP


This is a WIP PR to allow code review in parallel

Refactored code to avoid extra code in _grouped_index.html.haml including test to verify
Added main logic and bootstrap style (based on checkboxes) to allow merging and deleting tags if user is admin
Removed unused flags resources
Added some styles to allow showing debug information in screen while running in dev environment

Still Pending:
Control params for new action "reorganize" in tags_controller 
Adding control to avoid merges without new names.
Adding warning popup before merging or deletion
Adding Tests
Si uso la tecnica propuesta en tu comentario para recibir el array de checkboxes seleccionados entonces params[:tags] es algo asi como un array de strings donde cada string define un hash

["{value => 'ingles'}","{value => 'otrotag'}"]

Puedo iterar por los elementos de array pero si intento hacer .values en el primero me dice que .values no es valido en string (o privado no me acuerdo)

Por lo tanto o hago un regex o parsing o intento evaluar como hash y acceder al .values

 
BlackBerry de movistar, allí donde estés está tu oficin@

-----Original Message-----
From: Saverio Trioni <notifications@github.com>
Date: Wed, 24 Dec 2014 08:57:54 
To: coopdevs/timeoverflow<timeoverflow@noreply.github.com>
Reply-To: coopdevs/timeoverflow <reply@reply.github.com>
Cc: Daniel Macho<danielmacho72@gmail.com>
Subject: Re: [timeoverflow] Tasks admin tags - WIP (#113)

> +                  :new_name,
> +                  :delete_button,
> +                  :merge_button,
> +                  tags: [])
> +  end
> +
> +  def alpha_tags_from_post_type(post_type)
> +    case post_type
> +    when "offer" then Offer
> +    when "inquiry" then Inquiry
> +    when "all" then Post
> +    end.active_alpha_tags(current_organization)
> +  end
> +
> +  def selected_tags(params)
> +    st = []

What params are you receiving to need an `eval` at all?

---
Reply to this email directly or view it on GitHub:
https://github.com/coopdevs/timeoverflow/pull/113/files#r22260114