I have been spending some time learning Rails and I thought one of the easiest
ways is to contribute to typo. My first thoughts were to clean up the admin
interface.
When you "Publish Changes" in the admin sidebar controller it uses render
:partial=>'publish' to flash the message "Changes published."
I think it would be a good idea to use this in other controllers. For example,
in the theme controller, you recieve no feedback when you activate a new theme.
Just to do something quick, in themes_controller.rb, I added render
:partial=>'publish' to switchto():
def switchto
setting = (Setting.find_by_name('theme') or Setting.new("name" => 'theme'))
setting.value = params[:theme]
setting.save
render :partial => 'publish'
redirect_to :action => 'index'
end
and I then inserted _publish.rhtml in /app/views/admin/themes with this code:
<p>Changes published</p>
<script type="text/javascript">new Effect.Highlight("messages");</script>
Nothing happens with these changes. What could the problem be? Is there
another way of accomplishing this? I am new to Rails and programming, so any
help, thoughts or ideas are greatly appreciated.
Tracey
http://52reasons.ath.cx