Most online stores thrive on customer satisfaction and their loyalty towards their stores. In order to improve the long term relationship with the customers and earn their loyalty, stores come up with different ideas to keep customers engaged. One such … Continue reading →Read more at the source
While you can already do something like this with
execute in your migrations:
execute("CREATE VIEW my_tasty_snacks AS SELECT * FROM snacks WHERE food = 'Tasty';")
With RailsOnPage, you’re provided a DSL so that you can do the following:
create_view :my_tasy_snacks do |view| view.select '*' view.from 'snacks' view.conditions 'food' => 'Tasty' end
note: I haven’t tested the above, just a hypothetical example
Anyhow, if you’re in the habit of using views, functions, or triggers with your PostgreSQL database and are using Ruby on Rails, you might give RailsOnPg a whirl.Read more at the source
We’ve been doing some early (or late… if you’re a half-full kind of person) spring cleaning on some of our projects. One of the small projects, flash_message_conductor, which we released last year as a plugin is now a gem. We’ve been moving away from using plugins in favor of gems as we like locking in specific released versions and being able to specify them in our
environment.rb file is quite convenient.
To install, just run the following:
sudo gem install flash-message-conductor --source=http://gemcutter.org Successfully installed flash-message-conductor-1.0.0 1 gem installed Installing ri documentation for flash-message-conductor-1.0.0... Installing RDoc documentation for flash-message-conductor-1.0.0...
You’ll then just need to include the following in your
Rails::Initializer.run do |config| # ... config.gem 'flash-message-conductor', :lib => 'flash_message_conductor', :source => "http://gemcutter.org" end
You can take a peak at the README for usage examples.
We’ll be packaging up a handful of our various plugins that we reuse on projects and moving them to gems. Stay tuned…Read more at the source