Hi all,
I've posted a few thoughts on how to combine Hobo and Appcelerator to
create a quick mobile app here:
http://cookbook.hobocentral.net/recipes/1802-appcelerator-titanium-mobile-app-and-hobo
I was hoping to get some feedback...if anyone is interested.
It also has occurred to me that making mobile apps from Hobo would be
way easier if json was supported as a common response method in Hobo's
built-in features....like here:
def create_response(new_action, options={}, &b)
flash_notice
(ht( :"#{@this.class.to_s.underscore}.messages.create.success", :default=>["The
#{@this.class.model_name.human} was created successfully"])) if valid?
response_block(&b) or
if valid?
respond_to do |wants|
wants.html { redirect_after_submit(options) }
wants.js { hobo_ajax_response || render(:nothing =>
true) }
end
else
respond_to do |wants|
# errors is used by the translation helper, ht, below.
errors = this.errors.full_messages.join("\n")
wants.html { re_render_form(new_action) }
wants.js { render(:status => 500,
:text =>
ht( :"#{this.class.to_s.underscore}.messages.create.error", :errors=>errors,:default=>["Couldn't
create the #{this.class.name.titleize.downcase}.\n #{errors}"])
)}
end
end
end
In general just adding the right "wants.json" - is anyone interested
in pursuing with me?
Thanks,
Mike