We were inconsistent on this one. I consider it particularly useful when a method starts with a `return` statement. In other cases, we probably shouldn't have a guard rule in the middle of a method in any case, but that's a different refactoring.
16 lines
339 B
Ruby
16 lines
339 B
Ruby
module Admin::ProposalDashboardActionsHelper
|
|
def active_human_readable(active)
|
|
return t("admin.dashboard.actions.index.active") if active
|
|
|
|
t("admin.dashboard.actions.index.inactive")
|
|
end
|
|
|
|
def default_actions
|
|
%w[polls email poster]
|
|
end
|
|
|
|
def css_for_resource(action)
|
|
"hide" if action == "proposed_action"
|
|
end
|
|
end
|