textarea rows:'5' @testform.testing doesn't do what you want it to do?
On Mon, May 12, 2014 at 1:51 AM, Sebastjan Hribar <
sebastjan.hri...@gmail.com> wrote:
> Hi,
>
> can someone tell me if multi-line input field is possible to do with
> markaby?
>
> If I use input tag like so:
>
> ---
That will allow you to host two apps via a single config file. To separate
out your MVCs, try this:
-- myapp.rb --
%w(camping).each { |lib| require lib }
Camping.goes :MyApp
%w(helpers models views controllers).each { |lib| require lib }
module MyApp
...
end
-- models.rb --
module MyApp::Mod
Action Mailer is the most well known. The top three will probably be the
most useful to you:
https://www.google.com/search?q=rails+action+mailer
Dave
On Thu, Mar 28, 2013 at 9:01 AM, Francois Sery wrote:
> Hello,
> i'm looking for a gem to send emails from my camping app.
> Advices and code exa
On 4:
http://api.rubyonrails.org/classes/ActiveRecord/Migration.html#label-Reversible+Migrations
Looks like you just define the up, AR takes care of the rest. Never
tried it, it'll save a few lines of code though.
On injection, AR sanitizes almost everything I believe. The only thing
I know to a
1) I usually do 1.3:
def self.connect env
App::Models::Base.establish_connection App.config[env]['db_connection']
App::Models::Base.logger = Logger.new File.dirname(__FILE__) +
App.config[env]['db_log']
end
def self.create env = 'dev'
self.connect env
self.create_schema
end
2) I've never
On the linking thing, could you invoke a method in the main app from a
sub-app which takes a sub-app name and a route as variables? The
method could then just return R() from the appropriate sub-app.
Dave
On Sat, Feb 18, 2012 at 4:55 PM, Isak Andersson wrote:
> http://pastebin.com/JuHhW0R
>
> No
Magnus, would that still support the dynamic reloading of the app file
that the camping server does now?
Dave
On Tue, Dec 20, 2011 at 9:41 AM, Magnus Holm wrote:
> On Tue, Dec 20, 2011 at 15:14, Isak Andersson wrote:
>> Den 2011-12-20 14:09:02 skrev David Susco :
>>
>>
I've never found myself working on multiple apps at once in a dev environment.
Dave
On Tue, Dec 20, 2011 at 6:14 AM, Magnus Holm wrote:
> I think the ability to load multiple Camping apps at once makes things
> a lot more difficult (e.g. how to deal with static files).
>
> Does anyone actually u
Not sure what other people are doing but I already have my apps in
separate folders. Each app has:
app/
app/app.rb
app/app/
app/config/
app/public/
app/lib/
app/db/
app/log/
When I launch a new one I just add it to the apache conf and restart.
Dave
On Tue, Dec 20, 2011 at 6:05 AM, Jenna Fox wr
#1 gets my vote.
Dave
On Mon, Dec 19, 2011 at 6:24 PM, Philippe Monnet wrote:
> Plus people familiar with - or switching from ;-) - Rails and other
> frameworks would also feel at home.
>
>
> On 12/19/2011 3:46 PM, Jenna Fox wrote:
>
> Mmm that's true. Lets stick with that.
>
>
> —
> Jenna Fox
>
So then I'd have to remember it's the opposite of the way it's been? :P
Dave
On Mon, Dec 19, 2011 at 5:53 PM, Jenna Fox wrote:
> If no hard dependancies, can we switch it around so core camping is in a
> camping-seedling gem, and the regular camping gem is actually the one with
> all the omnibus
Stick with the way we're doing it. I only use markaby when it's
easier/prettier to use then HAML (quick one-line helpers and the
like).
Dave
On Mon, Dec 19, 2011 at 4:26 PM, Magnus Holm wrote:
> On Mon, Dec 19, 2011 at 21:34, Isak Andersson wrote:
>>> My suggestion would be to make it Markaby 2
I think that's immensely useful. It'll allow me to keep JS/CSS/HTML
separate from the app files but still packaged with the app.
Dave
On Fri, Dec 16, 2011 at 3:13 PM, Magnus Holm wrote:
> Here's one useful snippet:
>
> def (Before="").new(a,*o)Rack::Cascade.new(o<
> This means that this app:
>
Are you running Apache? Is so, try installing passenger. I've got half
a dozen apps running via this, it makes things pretty easy.
http://www.modrails.com/
Dave
2011/10/9 Bartosz Dziewoński :
> Does it work the "regular" way? (via rackup)
>
> Does it work "your" way, but with a different handler
n Tue, Aug 30, 2011 at 6:20 PM, Tim Uckun wrote:
> On Wed, Aug 31, 2011 at 1:33 AM, David Susco wrote:
>> I've got five camping apps in production. They're mostly CRUDs with
>> some basic searching/e-mailing/etc. I use a few third party libraries;
>> haml, paper_trail, r
I've got five camping apps in production. They're mostly CRUDs with
some basic searching/e-mailing/etc. I use a few third party libraries;
haml, paper_trail, rack/csrf and redcloth being the main ones. I
haven't had too much need beyond those but your mileage will vary
obviously.
What Camping lack
Would you have to write the RE for every declaration?
ie...
module App::Controllers
get '/(.*)' do |name|
"Hello #{name}"
end
put '/(.*)' do |name|
"Hello #{name}"
end
end
Dave
On Thu, Aug 25, 2011 at 1:20 PM, Magnus Holm wrote:
> I just pushed a new feature to Camping
If I'm understanding your question correctly I think judicious use of
the @state instance variable will achieve what you're looking for.
You'll be able to store what you need and be able to access it from
request to request.
Another option would be to use sqlite in memory mode.
App::Models::Base.
in to
> salliemae.com or the redirect wouldn't work.
>
> I have the feeling that you're trying to simplify a person's user experience
> by prefilling a cumbersome form, but your strategy for doing this may be
> flawed.
> --beppu
> On Sun, Jul 3, 2011 at 8:06 PM, Da
for it, but I
> couldn't find anything.
>
> On Sun, Jul 3, 2011 at 4:46 AM, David Susco wrote:
>>
>> None of those, I'm in education, and we have to go through Sallie Mae.
>>
>> Dave
>>
>> On Sun, Jul 3, 2011 at 1:16 AM, John Beppu wrote:
, Jun 30, 2011 at 6:48 AM, David Susco wrote:
>>
>> Ideally I'd like a user to be able to submit a form to the camping
>> app, having camping do all the validation and some preprocessing and
>> then have the camping app send the user to an external site (with the
>>
Ideally I'd like a user to be able to submit a form to the camping
app, having camping do all the validation and some preprocessing and
then have the camping app send the user to an external site (with the
post data) where the user can complete a payment.
Dave
On Wed, Jun 29, 2011 at 5:00 PM, Ste
Can I send POST data along with a redirect?
Dave
On Wed, Jun 29, 2011 at 3:44 PM, Steve Klabnik wrote:
> If you're sending them along, isn't that a redirect, not a POST?
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.
What's the cleanest way to do this? With Net::HTTP? I have a form
that's sent to a controller and validated. If its valid I'd like to
send the user on (along with the info they've entered) to an external
site to process payment.
Thanks,
Dave
___
Camping-
to be a way around it :/
>>
>> // Magnus Holm
>>
>> On Tue, May 24, 2011 at 19:53, David Susco wrote:
>>> Not really Camping specific, but I've always had better luck asking on
>>> this list than any of the rails ones. I'm trying to upgrade from
&
Not really Camping specific, but I've always had better luck asking on
this list than any of the rails ones. I'm trying to upgrade from
activerecord 2.3.8 to 3.0.7 and I'm getting a
ActiveRecord::ConnectionNotEstablished error when the
has_and_belongs_to_many association is being used.
A simple ex
What version of ruby is Heroku running?
Dave
On Thu, Jan 20, 2011 at 12:14 AM, adam moore wrote:
> Hello there!
>
> Been loving getting stuck in & creating bits & bobs with this
> wonderful little framework. Had a go at making a listing of a bunch of
> opening events which occur in my current ci
x27;CAMPING_ENV'] = "test" before loading any tests.
>
> // Magnus Holm
>
>
>
> On Tue, Aug 24, 2010 at 16:21, David Susco wrote:
>> Ya, that's what I'm doing. Just wondering if there was another way to
>> go about it. I modified your camping-test/
9:44 AM, Magnus Holm wrote:
> Why don't add this?
>
> def App.create(env = :development)
> end
>
> And in production, you can call App.create(:production) yourself.
>
> // Magnus Holm
>
>
>
> On Tue, Aug 24, 2010 at 15:36, David Susco wrote:
>> No
Not talking about having it recycle (I assume all Camping apps have a
small carbon footprint).
I'm talking about letting the create method know this is the
dev/test/prod environment and have it load the appropriate database
connection info etc.
Any thoughts on this? Having create take an env argu
Nothing that I know of.
I tried it but never got Junebug to work with 2. I eventually got fed
up enough that I put together my own wiki app by looking at it and
tepee. I used vestal_versions for the versioning and recreated most of
the junebug functionality so far (currently working on diff). It's
> %p= @something_nasty
>
> will be escaped by default. See:
>
> http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#escape_html-option
>
> for more info.
>
> Best,
> Ted
>
> On Mon, Aug 9, 2010 at 9:15 AM, David Susco wrote:
>> Hey guys,
>&
> On Tue, Aug 10, 2010 at 22:50, David Susco wrote:
>> Thanks, that did the trick. Got to comb through my templates now though :P.
>>
>> On Tue, Aug 10, 2010 at 4:01 PM, Magnus Holm wrote:
>>> David,
>>>
>>> As far as I remember, this should
ptions (as specified in
> http://github.com/rtomayko/tilt/blob/master/TEMPLATES.md) by:
>
> set :EXTENSION, { :a=> true, :b => false }
>
> // Magnus Holm
>
>
>
> On Mon, Aug 9, 2010 at 19:08, David Susco wrote:
>> Thanks I'll look into the middleware.
>>
&
l be escaped by default. See:
>
> http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#escape_html-option
>
> for more info.
>
> Best,
> Ted
>
> On Mon, Aug 9, 2010 at 9:15 AM, David Susco wrote:
>> Hey guys,
>>
>> What do people do to protect against c
Hey guys,
What do people do to protect against cross-site request forgery? To
mimic what rails does I was thinking of creating a unique key for each
session, and then in my logged_in? helper checking if the key passed
by the user matches the one I set in the session.
On the second question, I'm u
On a somewhat related note. How do people handle static content in a
development environment? Is there a way to make the camping server
aware of the public/ directory and serve the files within it?
What about in production? Is passenger smart enough to pass requests
for files in public/ back to ap
That's weird, I can't test anything until Monday but what happens when
you nest it in two ifs?
If @company.valid?
if @user.valid?
save
On Sat, Jul 31, 2010 at 12:17 PM, Skyler Richter
wrote:
> @David Susco
>
> I figured that was the way to do it. Thats what I tried the
You could check if both the company and user are valid, and if so create them.
@company = Company.new (...)
@user = User.new (...)
if (@company.valid? and @user.valid?)
@company.save
@user.save
)
Dave
On Sat, Jul 31, 2010 at 7:20 AM, Magnus Holm wrote:
> Hey campers,
>
> I'm wondering if a
gt; Could you test one more thing for me? Without a Tilt patch, can you
> add `require 'camping/templates'` right after `require 'camping'` and
> check if it still works?
>
> Here you go: `gem install camping --source http://gems.judofyr.net/`
>
> // Magnus Holm
>
>
his instead:
>
> module App
> include X
> end
>
> // Magnus Holm
>
>
>
> On Fri, Jul 23, 2010 at 18:01, David Susco wrote:
>> Hey Magnus, I patched the files and it's still the same thing. Here's
>> the backtrace, let me know if you want browser
a
> method is way faster than instance_eval, so this gives a significant
> speed improvement. The problem by defining the method under
> Tilt::CompileSite is that constant lookup is now relative to
> Tilt::CompileSite instead of your request. This is what the patch
> fixes.
>
> // Magnus
agnus Holm
>
>
>
> On Wed, Jul 21, 2010 at 21:05, David Susco wrote:
>> When using Tilt for views I need to completely specify the controller
>> within the template file.
>>
>> For example, in a Markaby view I can do this:
>>
>> URL(LogIn)
>>
>
When using Tilt for views I need to completely specify the controller
within the template file.
For example, in a Markaby view I can do this:
URL(LogIn)
But in a template file I have to do this:
URL(MyApp::Controllers::LogIn)
Is there anyway around this?
--
Dave
_
_button, R(SomeController), 'Some Controller'
The comma after _button is the key.
Anyway, they both worked for me, thanks Magnus.
Dave
On Fri, Jul 9, 2010 at 9:47 PM, David Susco wrote:
> Thanks Magnus, those changes make sense to me. I can test them out no
> problem, just not u
;b)
> +def render(v, *a, &b)
>if t = lookup(v)
> -s = (t == true) ? mab{ send(v, &b) } : t.render(self,
> o[:locals] || {}, &b)
> +o = a[0] || {}
> +s = (t == true) ? mab{ send(v, *a, &b) } : t.render(self,
> o[:locals] || {}, &
inside the quotes (e.g. <%=render
> "_mypartial" 123 'arg2' %> )? If so the Camping render should be only
> performing the lookup on the partial name (the v argument) and send the
> other arguments along.
>
> On 7/9/2010 9:14 AM, David Susco wrote:
>
>
nto a symbol. It's
trying to lookup a method "_button R(SomeController), 'Some
Controller'" rather than a method "_button" with the arguments
"R(SomeController), 'Some Controller'".
Hopefully that was clear enough.
Dave
On Fri, Jul 9, 201
I agree to the separation as well. A site that introduces camping with
a simple example/tutorial and that links to a wiki (with more advanced
stuff) and the mailing list is a good way to go about it.
Dave
On Thu, Jul 8, 2010 at 10:20 PM, Philippe Monnet wrote:
> Yeah, I agree that it makes sense
:
> <%=render "_mypartial" %>
>
> Philippe (@techarch)
>
> On 7/8/2010 2:19 PM, David Susco wrote:
>
> Thanks Philippe, it's working great.
>
> Has anyone gotten partials to work with Tilt?
>
> Dave
>
> On Wed, Jul 7, 2010 at 9:58 PM, P
Philippe (@techarch)
>
> On 7/6/2010 10:07 PM, Philippe Monnet wrote:
>
> Hi David, I will look into this (probably this week-end though) - as I
> actually did not try Tilt at the same time as RESTstop.
>
> On 7/6/2010 7:45 AM, David Susco wrote:
>
> Still fooling around wit
there anyway to call partials (markaby or other template
files) from a template file?
Dave
On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote:
> I'm trying to use the new Tilt integration with reststop. All the
> aliases and whatnot under "Implementing your own service"
>From an SEO standpoint rubycamping is probably the better choice over
whywentcamping. Although changing the header to "Camping, a Ruby
Microframwork" would probably be enough anyway.
Dave
On Wed, Jun 30, 2010 at 8:57 AM, Philippe Monnet wrote:
> Thanks Magnus! I love the idea of working on the
I'm trying to use the new Tilt integration with reststop. All the
aliases and whatnot under "Implementing your own service"
(http://wiki.github.com/camping/reststop/) are there and :views has
been set in the options hash. I tried creating sub-directories in the
views directory (html, HTML) but I st
Has anyone had any experience with vestal_versions, has_versioning, or
another similar gem with camping?
I'm currently fooling around with vestal_versions ( :P ) trying to
figure out how to create the version table. Apparently this is handled
via a script/db migration in Rails, and without somethi
Is the hoe gem installed?
Dave
On Tue, Jun 8, 2010 at 1:01 PM, Raimon Fernandez wrote:
>
> On 8jun, 2010, at 18:43 , David Susco wrote:
>
>> I don't believe the gem has been updated to include Matt's or
>> Philippe's latest changes. You could clone it from G
I don't believe the gem has been updated to include Matt's or
Philippe's latest changes. You could clone it from GitHub though and
rake and install it yourself.
Dave
On Tue, Jun 8, 2010 at 11:55 AM, Raimon Fernandez wrote:
> Hi Dave,
>
> On 8jun, 2010, at 17:04 , David S
Camping with reststop ought will make serving the xml files easy
enough. The example on github ought to get you started:
http://github.com/camping/reststop
Dave
On Tue, Jun 8, 2010 at 2:25 AM, Raimon Fernandez wrote:
> hi list,
>
>
> This is my first time here, my first time reading seriously s
Indeed, congratulations everyone. And thank you to all those who made
the 199 commits.
On Fri, Apr 9, 2010 at 12:14 PM, John Beppu wrote:
> Good job.
>
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinf
No hiccups with my apps.
Dave
On Sat, Apr 3, 2010 at 4:23 PM, Magnus Holm wrote:
> Ladies and gentlemen:
> gem install camping --prerelease
> (Look, no --source!)
> I'm not a big fan of betas/RCs, but this is a rather big change and I want
> to make sure we release something that actually wo
Has anyone managed to get camping to work with reststop using 1.9.354?
--
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list
Hey guys,
A user would like to download a table dump as a CSV, what's the best
way to do this?
ActionController has send_data:
http://api.rubyonrails.org/classes/ActionController/Streaming.html
Is there something similar built into Camping?
If not, is there a way to override the response heade
App
> include VerifyConnection
> end
> Or, pass reconnect => true to establish_connection.
> I'm not quite sure what's best…
> // Magnus Holm
>
>
> On Fri, Feb 19, 2010 at 20:59, David Susco wrote:
>>
>> I have a few camping projects that are about
I have a few camping projects that are about to go into production in
a few weeks, just picking your brains to see if I can add some
robustness.
What's the best way to catch any "Camping Problem! /XXX not found"
errors that a user might see if they start typing URLs themselves?
Ideally I'd just li
Hi all,
Instead of having the following:
def index
h1 'My Site'
p 'Welcome to my site!'
end
output this:
My SiteWelcome to my site!
Is there anyway that I can configure Markaby to add line breaks
between block elements so I'd get something like this:
My Site
Welcome to my site!
Obviousl
It's a link to a web comic, xkcd. It's work safe.
On Mon, Aug 17, 2009 at 9:35 PM, in-seok hwang wrote:
> What is this url(http://xkcd.com/624/)?
>
>
> 2009/8/17 Dave Everitt
>>
>> ROFL! - DaveE
>>
>>> If they weren't then, they are now:
>>> http://xkcd.com/624/
>>
>>
out a way to access partials from the Views module.
Dave
On Tue, Jun 16, 2009 at 3:18 PM, David Susco wrote:
> So I like using ERB for views and have it implemented something like this:
>
> render t
> content = ERB.new(File.read "./some_app/views/#{t}.erb").result bind
So I like using ERB for views and have it implemented something like this:
render t
content = ERB.new(File.read "./some_app/views/#{t}.erb").result binding
ERB.new(File.read "./some_app/views/layout.erb").result binding
end
So, effectively I have no Views module. However, I'd like to make use
ilar speed passenger up any?
On Wed, Jun 10, 2009 at 8:45 PM, David Susco wrote:
> OK, good to know. What the latest version I can use?
>
> Dave
>
> On Wed, Jun 10, 2009 at 5:46 PM, Magnus Holm wrote:
>> Unfornately, Camping doesn't (yet) work on Ruby 1.9.1. Unless someone e
gnus Holm
>
>
> On Wed, Jun 10, 2009 at 22:30, David Susco wrote:
>>
>> I've disabled SELinux to see if I could get any farther.
>>
>> I managed to get passenger installed and working, however a fancy
>> passenger generated page is telling me the app couldn
'>=1.9.316'
%w(rack camping).each { |lib| require lib }
puts 'done'
I'm tried reinstalled camping 1.9.316 but that didn't change anything.
Any ideas?
Dave
On Wed, Jun 10, 2009 at 10:39 AM, David Susco wrote:
> I'm trying to get passenger working presently,
cumentation/Users%20guide.html#_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it
Dave
On Tue, Jun 9, 2009 at 11:28 AM, Jonathan Groll wrote:
> Hi David,
>
> On Tue, Jun 09, 2009 at 09:29:22AM -0400, David Susco wrote
I'd definitely be interested in seeing any work you do with this.
Having it up on the wiki would be nice too.
I'm still trying to figure out deployment with camping 1.5. I've
experimented with 1.9.316 and rack but have yet to get an app to work
with that. The same with Picnic.
Dave
On Tue, Jun 9
What version of the gem are you using? 1.2.4? I'm assuming you
compiled ruby yourself based off of its location, did you compile
sqlite as well or get it through your OS package manager? In either
case, I've found you'll need the sqlite header files for the gem to
work correctly. In your package ma
I haven't looked into Rack in depth, is there a camping/rack/mongrel
tutorial out there?
Dave
On Fri, Jun 5, 2009 at 1:54 AM, Jonathan Groll wrote:
> Hi David,
>
> On Wed, Jun 03, 2009 at 10:24:01AM -0400, David Susco wrote:
>>
>> I have a few camping apps I'd li
I have a few camping apps I'd like to start automatically if my server
ever restarts. There's an init.d file that comes with mongrel_cluster
that you can use for rails apps, is there anything out there for
camping apps though?
With the postamble containing all the configuration for the app, it
see
n a Hash like { 'id' => ..., 'name' => ... } (maybe
> the keys are Symbols; I don't remember at the moment)
> //Magnus Holm
>
>
> On Thu, May 21, 2009 at 15:50, David Susco wrote:
>>
>> Thanks, I've gotten it to work.
>>
>> On t
t;
> But update_attributes should also return true or false, I believe.
>
> On Wed, May 20, 2009 at 4:42 PM, David Susco wrote:
>> So, in my crud controllers, should I be using calls to save instead of
>> create and update_attributes? As those just return the object, and not
>&g
tle rusty on AR at the moment, but I think it looks something like
>> this:
>> In the controller:
>> if @user.valid?
>> # everything is fine
>> else
>> # ops! @user.errors contains the errors
>> end
>> //Magnus Holm
>>
>>
>> On
I ended up overwriting the redirect method with this:
def redirect *a
r(302, '', 'Location' => 'my_vhost.net/my_app/' + R(*a).to_s)
end
Thoughts?
Dave
On Tue, May 19, 2009 at 11:05 AM, David Susco wrote:
> Within an apache vhost I'm rewriting l
Can ActiveRecord::Validations::ClassMethods be used to provide
feedback to the user? I noticed the tepee example uses
"validates_uniqueness_of ". If the title isn't unique however nothing
is written and the user is never notified.
Does anyone have an example or two of how I could go about informin
g
> def initialize(app, options = {})
> �...@app = app
> end
>
> def call(env)
> �...@app.call(env.merge({ 'HTTP_HOST' => 'my_vhost.net' }))
> end
> end
> app = Thing.new(app)
> ---
> I also believe Apache is able to modify HT
Not sure if this list is still active but I haven't found another yet,
here's my setup and question.
* I'm running a camping app using a mongrel server listening at 127.0.0.1:X.
* I have a virtual host setup in Apache that is rewriting
my_vhost.net/my_app/ to 127.0.0.1:X.
* In one of my controller
83 matches
Mail list logo