I'm working on a Merb application using Haml as the templating language. As haml encourages moving logic out of the view and into helpers, I soon started thinking about removing the copy / text from the templates themselves. In the past I have either just left the text inline within the templates, or moved it into separate yaml files sep...
Hey there folks!
Im using merb, and getting weird variable in url after authentication. I figured out that variable contains base64 encoded data, but cannot understand why its appearing there, even if everything works ok. Just curious
It looks like this: http://foo.bar/?_message=....data....
What this variable for and what does it do ?...
Hey guys!
Im a beginner in Merb, so want to know, what is the best practices to cache data?
For example i have a page that shows list of books, that changes not really often, so im looking for a way to cache the data. There can be 2 choices: cache data from db or cache all page (html).
So, is there any tools to make simple and fast?
Th...
I'm in the preliminary stages of designing a new web application, and have yet to begin any sort of implementation. The application models a fairly complex domain, and I'd feel more comfortable using tools such as the ruby DataMapper ORM (having using NHibernate in the .net world) than Rails Active Record. I also prefer jquery over proto...
Hey there, im a little bit confused about handling invalid user authentication request, at login controller. So, i already have modified login view, but cant figure out where to put the exception handling block. It should work like this: you login - if its incorrect you will see warning message at /login .
Any ideas ?
...
If I want to perform a search on a directory that contains thousands of different ruby web applications and I want to find only those directories that contain rails projects, what text would I need to look for within each directory to uniquely distinguish the rails projects from the other project types?
At the moment, I have decided to ...
This is something that has been driving me mad over the past few days. I have an action which allows authenticated users to upload assets to the site. I know that the controller action is correct as I can run through the process manually however I want to test it using rspec.
I have to use the request helper so I can reuse an authentica...
My application has user part and /admin part. There are 2 models Account (like a customer) and Admin, and I should authenticate account and admin separately. Admins should not access account's part and accounts should not access admin area. Is there any solution for me or I should write 2 different applications for users and admins and t...
I am using merb with rspec and webrat. How to ensure that rjs template was successfully rendered? I cannot just write have_xpath because of ajax.
...
Basically I am java developer and exploring ruby and ruby related framework right now. I am mostly working on web based projects. I had heard about RoR and Merb for web development in ruby. I am looking for good tutorial/books for Merb.
...
Are there any future plans to replace selenium and watir with mechanize + johnson?
http://wiki.github.com/jbarnette/johnson
http://wiki.github.com/tenderlove/mechanize
...
Is it possible to have the router return an error code (or an entire rack response) in response to a matched route?
E.g. I have move from WordPress to a home grown blogging solution. Search engines are hitting URLs like '/?tag=ruby' that need to return a 406 error. Instead, the router dutifully routes them to the same place as '/' I c...
I am writing my own blog (every one should, it's good experience). I have implemented Atom and RSS feeds, and they are used by a number of readers. Most of those readers are using Google Reader, who at the moment polls my site regularly for updates.
I would like to setup a publish Subscribe (PubSubHubbub) option as documented here, an...
Are the same unit testing frameworks used for different web frameworks - Rails, Merb, Sinatra, Ramaze and desktop frameworks - Shoes?
And what is the most widely used unit testing framework that would work with all of the various web and desktop frameworks?
...
I'm trying to hook up a blog with some xml namespaces and xml stylesheets.
The ugly way that I'm doing this currently looks like so:
!!! XML
= partial('xmlstyle')
%channel
......blah.....
= partial('xmlend')
where
_xmlstyle.xml.erb looks like:
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?>
<?xml-st...
Is there rails equivalents for :
Merb::BootLoader.after_app_loads
Merb::BootLoader.before_app_loads
Merb::Assets::JavascriptAssetBundler.add_callback
Merb::Assets::StylesheetAssetBundler.add_callback
Thanks,
...
merb datamapper seems to be broken.
$ merb
Loading init file from /home/kristian/workspace/ruby/nightly/config/init.rb
Loading /home/kristian/workspace/ruby/nightly/config/environments/development.rb
:size option is deprecated, use String with :length instead (/usr/lib/ruby/gems/1.8/gems/merb_datamapper-1.0.12/lib/merb/session/data_mapp...
I started learning Datamapper and what I liked about it was that I can write my models with real inheritance.
Now I wonder, if it is possible to be more advanced about this:
class Event
include DataMapper::Resource
property :id, Serial
property :begin, DateTime
property :type, Discriminator
end
class Talk<Event
property :tit...
Is there a way that I can have auto completion in Vim after I load a model from the database?
So for example if I have a model of type Foo with an instance method of type bar and do the following
foo = Foo.first(:param=>'x')
foo.b
should show me bar as a possible auto complete value. I think that this is somewhat hard to accomplish wi...
I'm coding a Merb application which uses a combination of SimpleDB and Tokyo Tyrant for storage. For both of these data stores I'm implementing IN (list) type-functionality by spinning up a thread for each value in list and then merging the result sets. Bearing in mind that this is a web application, is there a limit to the number of thr...