How to Use All View and Helper Methods in Rails Console
run and preview a view helper
1
2
3
| > YourController.helpers.my_helper
> ApplicationController.helpers.content_tag(:div, "Hello World!")
|
create params in rails console
1
2
3
4
5
6
7
8
| # ActionController::Parameters.new
params = ActionController::Parameters.new({
person: {
name: 'Francesco',
age: 22,
role: 'admin'
}
})
|