Skip to content

fixing model with namespace#83

Open
brenoperucchi wants to merge 1 commit intowerein:masterfrom
brenoperucchi:fixing_namespace
Open

fixing model with namespace#83
brenoperucchi wants to merge 1 commit intowerein:masterfrom
brenoperucchi:fixing_namespace

Conversation

@brenoperucchi
Copy link
Copy Markdown

@brenoperucchi brenoperucchi commented Feb 17, 2017

Line 40 it resolve the problem with namespace in the model with strong_params on controller.

proposal = Admin::Proposal.first
editable proposal

params on Controller will get "params[:proposal]" and not "params[:admin_proposal]"

I didn't get to compare version 1.5.5 correctty with master

when String
if source.is_a?(Array) && source.first.is_a?(String)
source.map { |v| { value: v, text: v } }
source.inject({}){|hash, key| hash.merge(key => key)}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space missing to the left of {.
Space between { and | missing.
Space missing inside }.

{ '1' => source[0], '0' => source[1] }
end
else
when String
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent when as deep as case.

else
safe_join(source_values_for(value, source), tag(:br))
end
safe_join(source_values_for(value, source), tag(:br)) unless %w(select checklist).include? data[:type]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [116/80]

nested = options.delete(:nested)
title = options.delete(:title) do
klass = nested ? object.class.const_get(nested.to_s.classify) : object.class
klass = nested ? object.class.const_get(nested.to_s.singularize.capitalize) : object.class
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [104/80]

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.

2 participants