简体   繁体   中英

ActiveSupport Ruby on Rails

I'm taking over an existing project of Ruby on Rails, and I have this kind of stuff displayed on the website:

--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess
controller: static_pages
action: home

This is displayed on every page, and I'd like to remove this.

Any bit of help is appreciated

Look for this in your application.html.erb :

<%= debug(params) if Rails.env.development? %> or <%= debug(params) %>

That's the code that display all these information and remove it if needed, but it may only be displayed in development environment if the condition is present.

Your predecessor has put some code in a view file, by the sounds of it either a layout or a partial that is loaded by a layout, which renders the information out. It's not standard rails behaviour. You can look for it with this command line snippet (run in your rails folder)

find app/views  -print | awk '{print "\""$0"\""}' |xargs grep -n "controller:"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM