Posts Tagged ‘baseapp-orange’
BaseApp Orange v3
September 22nd, 2009 • Comments Off Blog, Programming
Tags: baseapp-orange, github, rails, ruby
Time has been scarce but I managed to save a little to update BaseApp Orange.
BaseApp Orange is a fork from BaseApp in attempt to make it a more suitable backoffice and structure for my own projects but it might have something you like. It’s like I made a base for a cake and you take care of the filling. :P
Anyway, here’s the main changes:
- app was updated to Rails 2.3.4
- added New Relic Gem
- added inherited_resources plugin which enabled me to reduce a lot of code in the REST admin controllers
- cleaned up and improved admin theme and code
- improved admin generator according to inherited_resources. After creating your model run script/generate adminator model_name
- added iPhone style Checkboxes to admin theme. thanks to Thomas Reynolds.
- replaced FckEditor with TinyMCE. There should be a speed increase.
The code for the project can be found at BaseApp Orange Github page.
Here’s some images:
BaseApp Orange updated with basic pages and i18n support
March 12th, 2009 • Comments Off Blog, Programming
Tags: baseapp-orange, Blog, orange, rails, ruby
Just a quick post to illustrate the changes I did to BaseApp Orange and how you can help shape it’s way.
BaseApp Orange is my attempt to create a base for future Rails projects which end up having similar constraints and features. This week I posted the code on github and I did some changes I thought I should comunicate.
Added SEO fields for Pages
I consider this one important. Basicaly, for each Page you create in the admin area, you can write the meta-keywords, meta-description and page slug for that page. When this page shows up in the frontend, that information will be part of it (unless they’re blank).
You can also define this on a global scale for the app (in the config/config.yml file) and that way you can make your app more SEO friendly.
Basic i18n support
This is fairly new to me but I think I did some advances on this part. I defined two locales for the application, so there’s english and portuguese and i’ve got 2 yml files in config/locales/ with date formats, numbers, model names, attributes and much more.
You can also use this yml file to store your own translations, like the below example:
I also got a before_filter setup on the application.rb controller that sets the locale for each request:
before_filter :set_locale
def set_locale
locale = params[:locale] || 'pt'
I18n.locale = locale
end
And I got this working for Pages by defining my routes as this:
map.pages '/pages/:permalink/:locale', :controller=>"pages", :action=>"show", :defaults => { :locale => 'pt' }
This works fine even in the case you didn’t put the locale in the params.
Now all I have to figure out is how to do the same for restful routes and translate the rest of the pages.
Any ideas?











