ooo... ternary operation might work nicely here!

```ruby
@page_num = params[:page] ? params[:page].to_i : 1
```
or

```ruby
@page_num = params[:page].to_i || 1
```