<% if params[:action] == 'show' %> <% decreto_id = @filter_params[:id].to_i %> <% else %> <% decreto_id = nil %> <% end %>