My feeling is that the differences between Camping and Sinatra are not very significant and that you could safely choose either one and be ok. But I want to ask the Ruby experts if this is true. Are there in fact any important differences between the Sinatra and Camping microframeworks? And how would you go about deciding which one to us...
Using ruby, camping webframework, activerecord-2.1.1, my db structure is ...
create_table :Conf_posts do |t|
%w{title body username posttime hit passwd}.each do |col|
t.column :"#{col}", :string
end
end
I want sum of each username's hit
I have the following code.
Post.find :all, :select => "username,sum(hit)", :from => "Co...
I have a couple of views I'd like to have appear on every view that is rendered, but short of duplicating code or breaking the specifications, I can't seem to find a way to accomplish this.
Here's my current code, putting calls in every view:
def ImOnABoat::Views
def layout
html do
head do title "Petstore" end
body...
Users can view a specific entry in my webapp with a URL. /entry/8, for example. If an entry doesn't exist, "Entry not found" gets appended to @messages and I render an error page.
I'd like to show some arbitrary query instead of a blank page, but I can't figure out a good way to keep the error message around to be displayed. There are o...
Due to circumstances beyond my control, my production Camping site appears at mysite.example.com/mysite. I'm pretty sure this is a common Apache / Passenger configuration issue, and I'm not interested in how to fix it right now because the server is out of my control. Suffice to say, the controller for "/" points there and I can't chan...